Changeset 34 for trunk/Application
- Timestamp:
- Nov 24, 2011, 2:06:10 PM (13 years ago)
- Location:
- trunk/Application
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Clients/UChronisClientMySQL.pas
r33 r34 61 61 Filter := ''; 62 62 for I := 0 to AList.ColumnsFilter.Count - 1 do 63 Filter := Filter + AList.ColumnsFilter[I] + ',';64 Delete(Filter, Length(Filter) , 1);63 Filter := Filter + '`' + AList.ColumnsFilter[I] + '`, '; 64 Delete(Filter, Length(Filter) - 1, 2); 65 65 end else Filter := '*'; 66 66 if AList.ConditionUse then Condition := '`' + AList.ConditionColumn + '` = "' + 67 67 AList.ConditionValue + '"' 68 68 else Condition := '1'; 69 Database.Select(DbRows, AList.ObjectName, Filter, Condition); 69 Database.Query(DbRows, 'SELECT ' + Filter + ' FROM `' + AList.SchemaName + '`.`' + 70 AList.ObjectName + '` WHERE ' + Condition); 70 71 AList.Objects.Clear; 71 for I := 0 to DbRows.Count - 1 do 72 for I := 0 to DbRows.Count - 1 do begin 72 73 NewObject := TObjectProxy.Create; 73 74 NewObject.Client := AList.Client; 74 75 NewObject.Properties.Assign(TDictionaryStringString(DbRows[I])); 75 76 AList.Objects.Add(NewObject); 77 end; 76 78 finally 77 79 DbRows.Free; -
trunk/Application/UChronisClient.pas
r33 r34 43 43 ConditionUse: Boolean; 44 44 ObjectName: string; 45 SchemaName: string; 45 46 Objects: TListObject; // TListObject<TObjectProxy> 47 procedure SetCondition(ColumnName: string; Value: string); 46 48 procedure Clear; 47 49 constructor Create; … … 105 107 { TListProxy } 106 108 109 procedure TListProxy.SetCondition(ColumnName: string; Value: string); 110 begin 111 ConditionColumn := ColumnName; 112 ConditionValue := Value; 113 ConditionUse := True; 114 end; 115 107 116 procedure TListProxy.Clear; 108 117 begin
Note:
See TracChangeset
for help on using the changeset viewer.