Changeset 23 for trunk/Forms/UFormFields.pas
- Timestamp:
- Mar 26, 2018, 12:40:10 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormFields.pas
r22 r23 91 91 if FormField.ShowModal = mrOk then begin 92 92 FormField.Save(NewField); 93 Fields.Table.DbClient.Query('INSERT INTO ModelField ( Name , TextBefore) VALUES ( ' +94 NewField.Name + ' , ' + NewField.TextBefore + ' )');93 Fields.Table.DbClient.Query('INSERT INTO ModelField ( Name , Caption , Model , DataType ) VALUES ( ' + 94 NewField.Name + ' , ' + NewField.TextBefore + ' , ' + TableName + ' , ' + NewField.DataType.Name + ' )'); 95 95 ReloadList; 96 96 end else NewField.Free; … … 160 160 I: Integer; 161 161 begin 162 Fields.Clear; 162 163 DbRows := TDbRows.Create; 163 164 Fields.Table.DbClient.Query('SELECT * FROM ModelField WHERE Model = ' + Fields.Table.Name, DbRows); 164 165 for I := 0 to DbRows.Count - 1 do begin 165 NewField := TField.Create; 166 NewField.Table := Fields.Table; 167 Fields.Add(NewField); 166 NewField := Fields.AddNew(DbRows[I].Values['Name'], Fields.Table.DbClient.DbManager.DataTypes.SearchByName(DbRows[I].Values['DataType'])); 167 NewField.TextBefore := DbRows[I].Values['Caption']; 168 168 end; 169 169 DbRows.Free;
Note:
See TracChangeset
for help on using the changeset viewer.