Changeset 17 for trunk/Application/UDataTypes.pas
- Timestamp:
- Jun 13, 2011, 2:35:01 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UDataTypes.pas
r16 r17 86 86 ObjectId: Integer; 87 87 PropertyID: Integer; 88 PropertyName: string; 88 89 SelectedItemName: string; 89 90 function CreateControl(Owner: TComponent): TWinControl; override; 90 91 procedure SetupControl(Control: TWinControl); override; 91 92 procedure Load(CellValue: string); override; 93 procedure LoadDef(ACustomType: Integer); override; 92 94 end; 93 95 … … 185 187 end; 186 188 189 procedure TDataTypeRelationMany.LoadDef(ACustomType: Integer); 190 var 191 DbRows: TDbRows; 192 BaseType: Integer; 193 begin 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; 209 end; 210 187 211 { TDataTypeRelationOne } 188 212
Note:
See TracChangeset
for help on using the changeset viewer.