Changeset 37 for trunk/Forms/UItemAdd.pas
- Timestamp:
- Mar 8, 2012, 3:11:10 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemAdd.pas
r31 r37 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 9 StdCtrls, Spin, EditBtn, MaskEdit, USqlDatabase, USystem, 10 SpecializedDictionary, SpecializedList ;10 SpecializedDictionary, SpecializedList, UChronisClient; 11 11 12 12 type … … 53 53 var 54 54 Data: TDictionaryStringString; 55 NewProxy: TObjectProxy; 55 56 I: Integer; 56 57 DataType: TDataType; … … 59 60 try 60 61 Data := TDictionaryStringString.Create; 62 NewProxy := TObjectProxy.Create; 63 NewProxy.Client := Client; 64 NewProxy.ObjectName := SelectedObject.Table; 65 NewProxy.SchemaName := SelectedObject.Schema; 61 66 for I := 0 to Report.Columns.Count - 1 do 62 67 if not (TReportColumn(Report.Columns[I]).CustomType is TDataTypeRelationMany) then 63 68 if TReportColumn(Report.Columns[I]).ColumnName <> SelectedObject.PrimaryKey then begin 64 69 DataType := TReportColumn(Report.Columns[I]).CustomType; 65 Data.Add(TReportColumn(Report.Columns[I]).ColumnName,70 NewProxy.Properties.Add(TReportColumn(Report.Columns[I]).ColumnName, 66 71 DataType.GetControlValue(TWinControl(TReportColumn(Report.Columns[I]).Control))); 67 72 end; 68 Database.Insert(SelectedObject.Table, Data, SelectedObject.Schema);73 NewProxy.Save; 69 74 finally 70 75 Data.Free; 76 NewProxy.Free; 71 77 end; 72 78 //MainForm.LoadItemList;
Note:
See TracChangeset
for help on using the changeset viewer.