Changeset 29 for trunk/Forms/UFormFields.pas
- Timestamp:
- Sep 10, 2022, 10:54:56 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormFields.pas
r28 r29 160 160 161 161 procedure TFormFields.ReloadList; 162 var163 DbRows: TDbRows;164 NewField: TField;165 I: Integer;166 162 begin 167 Fields.Clear; 168 DbRows := TDbRows.Create; 169 try 170 Fields.Table.DbClient.Query('SELECT * FROM ModelField WHERE Model = ' + Fields.Table.Name, DbRows); 171 for I := 0 to DbRows.Count - 1 do begin 172 NewField := Fields.AddNew(DbRows[I].Items['Name'], 173 Fields.Table.DbClient.DbManager.DataTypes.SearchByName(DbRows[I].Items['DataType'])); 174 NewField.TextBefore := DbRows[I].Items['Caption']; 175 end; 176 finally 177 DbRows.Free; 178 end; 163 Fields.Load; 179 164 180 165 ListView1.Items.Count := Fields.Count;
Note:
See TracChangeset
for help on using the changeset viewer.