Changeset 33 for trunk/Application
- Timestamp:
- Nov 24, 2011, 1:45:12 PM (13 years ago)
- Location:
- trunk/Application
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/UChronisClient.pas
r28 r33 13 13 TOrderDirection = (odNone, odAscending, odDescending); 14 14 15 { T Query }15 { TObjectProxy } 16 16 17 TQuery = class 17 TObjectProxy = class 18 Id: Integer; 19 Properties: TDictionaryStringString; 20 Client: TChronisClient; 21 procedure Load; 22 procedure Save; 23 procedure Delete; 24 procedure Add; 25 constructor Create; 26 destructor Destroy; override; 27 end; 28 29 { TListProxy } 30 31 TListProxy = class 18 32 Client: TChronisClient; 19 33 OrderColumn: string; … … 25 39 ColumnsFilter: TListString; 26 40 ColummsFilterUse: Boolean; 41 ConditionColumn: string; 42 ConditionValue: string; 43 ConditionUse: Boolean; 44 ObjectName: string; 45 Objects: TListObject; // TListObject<TObjectProxy> 46 procedure Clear; 27 47 constructor Create; 28 48 destructor Destroy; override; 29 procedure Execute; virtual; 30 end; 31 32 TItemList = class(TListObject) // TListObject<TDictionaryStringString> 33 49 procedure Load; virtual; 50 procedure Save; virtual; 34 51 end; 35 52 … … 37 54 38 55 TChronisClient = class 39 //procedure GetItemList(Model: string; Condition: TCondition; ItemList: TItemList); virtual; abstract; 40 //procedure SetItemList(Model: string; Condition: TCondition; ItemList: TItemList); virtual; abstract; 56 Host: string; 57 Port: Word; 58 Schema: string; 59 User: string; 60 Password: string; 61 procedure ObjectLoad(AObject: TObjectProxy); virtual; abstract; 62 procedure ObjectSave(AObject: TObjectProxy); virtual; abstract; 63 procedure ObjectAdd(AObject: TObjectProxy); virtual; abstract; 64 procedure ObjectDelete(AObject: TObjectProxy); virtual; abstract; 65 procedure ListLoad(AList: TListProxy); virtual; abstract; 66 procedure ListSave(AList: TListProxy); virtual; abstract; 41 67 constructor Create; virtual; 42 68 end; … … 44 70 implementation 45 71 46 { T Query }72 { TObjectProxy } 47 73 48 constructor TQuery.Create;74 procedure TObjectProxy.Load; 49 75 begin 50 76 Client.ObjectLoad(Self); 51 77 end; 52 78 53 destructor TQuery.Destroy;79 procedure TObjectProxy.Save; 54 80 begin 81 Client.ObjectSave(Self); 82 end; 83 84 procedure TObjectProxy.Delete; 85 begin 86 Client.ObjectDelete(Self); 87 end; 88 89 procedure TObjectProxy.Add; 90 begin 91 Client.ObjectAdd(Self); 92 end; 93 94 constructor TObjectProxy.Create; 95 begin 96 Properties := TDictionaryStringString.Create; 97 end; 98 99 destructor TObjectProxy.Destroy; 100 begin 101 Properties.Free; 55 102 inherited Destroy; 56 103 end; 57 104 58 procedure TQuery.Execute; 105 { TListProxy } 106 107 procedure TListProxy.Clear; 59 108 begin 109 ConditionUse := False; 110 PageUse := False; 111 ColummsFilterUse := False; 112 OrderUse := False; 113 Objects.Free; 114 end; 60 115 116 constructor TListProxy.Create; 117 begin 118 ColumnsFilter := TListString.Create; 119 Objects := TListObject.Create; 120 end; 121 122 destructor TListProxy.Destroy; 123 begin 124 Objects.Free; 125 ColumnsFilter.Free; 126 inherited Destroy; 127 end; 128 129 procedure TListProxy.Load; 130 begin 131 Client.ListLoad(Self); 132 end; 133 134 procedure TListProxy.Save; 135 begin 136 Client.ListSave(Self); 61 137 end; 62 138
Note:
See TracChangeset
for help on using the changeset viewer.