Ignore:
Timestamp:
Jun 13, 2011, 2:35:01 PM (13 years ago)
Author:
george
Message:
  • Fixed: Loading content of RelationMany sublist in item view.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UDataTypes.pas

    r16 r17  
    8686    ObjectId: Integer;
    8787    PropertyID: Integer;
     88    PropertyName: string;
    8889    SelectedItemName: string;
    8990    function CreateControl(Owner: TComponent): TWinControl; override;
    9091    procedure SetupControl(Control: TWinControl); override;
    9192    procedure Load(CellValue: string); override;
     93    procedure LoadDef(ACustomType: Integer); override;
    9294  end;
    9395
     
    185187end;
    186188
     189procedure TDataTypeRelationMany.LoadDef(ACustomType: Integer);
     190var
     191  DbRows: TDbRows;
     192  BaseType: Integer;
     193begin
     194  try
     195    DbRows := TDbRows.Create;
     196    Core.System.Database.Select(DbRows, TypeRelationMany, '*', 'CustomType=' + IntToStr(ACustomType));
     197    PropertyID := StrToInt(DbRows[0].Values['ObjectProperty']);
     198  finally
     199    DbRows.Free;
     200  end;
     201  try
     202    DbRows := TDbRows.Create;
     203    Core.System.Database.Select(DbRows, PropertyTable, '*', 'Id=' + IntToStr(PropertyID));
     204    ObjectId := StrToInt(DbRows[0].Values['Object']);
     205    PropertyName := DbRows[0].Values['ColumnName'];
     206  finally
     207    DbRows.Free;
     208  end;
     209end;
     210
    187211{ TDataTypeRelationOne }
    188212
Note: See TracChangeset for help on using the changeset viewer.