Changeset 40 for trunk/Application
- Timestamp:
- Mar 9, 2012, 8:11:13 AM (13 years ago)
- Location:
- trunk/Application
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Clients/UChronisClientMySQL.pas
r38 r40 88 88 NewObject := TObjectProxy.Create; 89 89 NewObject.Client := AList.Client; 90 NewObject.ObjectName := AList.ObjectName; 91 NewObject.SchemaName := AList.SchemaName; 90 92 NewObject.Properties.Assign(TDictionaryStringString(DbRows[I])); 91 93 AList.Objects.Add(NewObject); -
trunk/Application/UDataTypes.pas
r37 r40 14 14 15 15 TDataType = class 16 Name: string; 16 17 CustomType: Integer; 17 18 Control: TWinControl; … … 23 24 procedure SetDefault; virtual; 24 25 function GetStringValue: string; virtual; 26 constructor Create; virtual; 25 27 end; 26 28 … … 37 39 procedure Load(CellValue: string); override; 38 40 procedure LoadDef(CustomType: Integer); override; 41 constructor Create; override; 39 42 end; 40 43 … … 49 52 function GetControlValue(Control: TWinControl): string; override; 50 53 procedure Load(CellValue: string); override; 54 constructor Create; override; 51 55 end; 52 56 … … 60 64 procedure SetupControl(Control: TWinControl); override; 61 65 procedure Load(CellValue: string); override; 66 constructor Create; override; 62 67 end; 63 68 … … 71 76 procedure SetupControl(Control: TWinControl); override; 72 77 procedure Load(CellValue: string); override; 78 constructor Create; override; 73 79 end; 74 80 … … 86 92 procedure Load(CellValue: string); override; 87 93 procedure LoadDef(ACustomType: Integer); override; 94 constructor Create; override; 88 95 end; 89 96 … … 99 106 procedure Load(CellValue: string); override; 100 107 procedure LoadDef(ACustomType: Integer); override; 108 constructor Create; override; 101 109 end; 102 110 … … 112 120 procedure SetupControl(Control: TWinControl); override; 113 121 procedure Load(CellValue: string); override; 122 constructor Create; override; 114 123 end; 115 124 … … 123 132 procedure SetupControl(Control: TWinControl); override; 124 133 procedure Load(CellValue: string); override; 134 constructor Create; override; 125 135 end; 126 136 … … 136 146 procedure SetupControl(Control: TWinControl); override; 137 147 procedure Load(CellValue: string); override; 148 constructor Create; override; 138 149 end; 139 150 … … 144 155 145 156 uses 146 USqlDatabase, USystem, UCore, UItemSelect ;157 USqlDatabase, USystem, UCore, UItemSelect, UMainForm; 147 158 148 159 function GetDataType(ACustomType: Integer): TDataType; … … 216 227 end; 217 228 229 constructor TDataTypeDateTime.Create; 230 begin 231 inherited Create; 232 Name := 'DateType'; 233 end; 234 218 235 { TDataTypeRelationMany } 219 236 220 237 function TDataTypeRelationMany.CreateControl(Owner: TComponent): TWinControl; 221 238 begin 222 Result :=inherited CreateControl(Owner);239 Result := inherited CreateControl(Owner); 223 240 end; 224 241 … … 260 277 end; 261 278 279 constructor TDataTypeRelationMany.Create; 280 begin 281 inherited Create; 282 Name := 'RelationMany'; 283 end; 284 262 285 { TDataTypeRelationOne } 263 286 264 287 procedure TDataTypeRelationOne.ButtonClickExecute(Sender: TObject); 265 begin 266 ItemSelectForm.ObjectId := ObjectId; 267 ItemSelectForm.ShowModal; 268 TEditButton(Control).Text := IntToStr(ItemSelectForm.SelectedId) 288 var 289 NewSelectForm: TItemSelectForm; 290 begin 291 try 292 NewSelectForm := TItemSelectForm.Create(MainForm); 293 NewSelectForm.ObjectId := ObjectId; 294 NewSelectForm.ShowModal; 295 TEditButton(Control).Text := IntToStr(NewSelectForm.SelectedId) 296 finally 297 ItemSelectForm.Free; 298 end; 269 299 end; 270 300 … … 309 339 end; 310 340 341 constructor TDataTypeRelationOne.Create; 342 begin 343 inherited Create; 344 Name := 'RelationOne'; 345 end; 346 311 347 312 348 { TDataTypePassword } … … 327 363 end; 328 364 365 constructor TDataTypePassword.Create; 366 begin 367 inherited Create; 368 Name := 'Password'; 369 end; 370 329 371 { TDataTypeFloat } 330 372 … … 349 391 end; 350 392 393 constructor TDataTypeFloat.Create; 394 begin 395 inherited Create; 396 Name := 'Float'; 397 end; 398 351 399 { TDataTypeDateTime } 352 400 … … 371 419 end; 372 420 421 constructor TDataTypeDate.Create; 422 begin 423 inherited Create; 424 Name := 'Date'; 425 end; 426 373 427 { TDataTypeBoolean } 374 428 … … 391 445 begin 392 446 Value := Boolean(StrToInt(CellValue)); 447 end; 448 449 constructor TDataTypeBoolean.Create; 450 begin 451 inherited Create; 452 Name := 'Boolean'; 393 453 end; 394 454 … … 422 482 end; 423 483 484 constructor TDataTypeNumber.Create; 485 begin 486 inherited Create; 487 Name := 'Number'; 488 end; 489 424 490 { TDataTypeString } 425 491 … … 444 510 end; 445 511 512 constructor TDataTypeString.Create; 513 begin 514 inherited Create; 515 Name := 'String'; 516 end; 517 446 518 { TDataType } 447 519 … … 481 553 end; 482 554 555 constructor TDataType.Create; 556 begin 557 inherited; 558 end; 559 483 560 end. 484 561
Note:
See TracChangeset
for help on using the changeset viewer.