- Timestamp:
- Nov 24, 2011, 1:45:12 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 5 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 -
trunk/UCore.pas
r29 r33 43 43 44 44 uses 45 UApplicationInfo, UChronisClientDirect ;45 UApplicationInfo, UChronisClientDirect, UChronisClientMySQL; 46 46 47 47 { TCore } … … 56 56 System := TChronisBase.Create; 57 57 System.Database := SqlDatabase1; 58 System.Client := TChronisClientDirect.Create; 58 System.Client := TChronisClientMySQL.Create; 59 TChronisClientMySQL(System.Client).Database := SqlDatabase1; 59 60 System.RegisterModule(TModuleSystem); 60 61 System.ModuleSystem := TModuleSystem(System.Modules.Last); -
trunk/USystem.pas
r31 r33 60 60 TReport = class(TListObject) 61 61 Base: TChronisBase; 62 Columns: TListObject; 62 Columns: TListObject; // TListObject<TReportColumn> 63 63 constructor Create; 64 64 destructor Destroy; override; … … 71 71 end; 72 72 73 { T ChronisObject}73 { TObjectProxy } 74 74 75 75 TChronisObject = class -
trunk/chronis.lpi
r32 r33 105 105 </Item6> 106 106 </RequiredPackages> 107 <Units Count="5 8">107 <Units Count="59"> 108 108 <Unit0> 109 109 <Filename Value="chronis.lpr"/> … … 153 153 <IsPartOfProject Value="True"/> 154 154 <UnitName Value="UPersistentForm"/> 155 <EditorIndex Value="6"/>156 155 <WindowIndex Value="0"/> 157 156 <TopLine Value="21"/> 158 157 <CursorPos X="63" Y="37"/> 159 158 <UsageCount Value="264"/> 160 <Loaded Value="True"/>161 159 <DefaultSyntaxHighlighter Value="Delphi"/> 162 160 </Unit4> … … 217 215 <ResourceBaseClass Value="Form"/> 218 216 <UnitName Value="ULoginForm"/> 219 <EditorIndex Value="11"/>220 217 <WindowIndex Value="0"/> 221 218 <TopLine Value="43"/> 222 219 <CursorPos X="24" Y="64"/> 223 220 <UsageCount Value="317"/> 224 <Loaded Value="True"/>225 <LoadedDesigner Value="True"/>226 221 <DefaultSyntaxHighlighter Value="Delphi"/> 227 222 </Unit9> … … 260 255 <EditorIndex Value="3"/> 261 256 <WindowIndex Value="0"/> 262 <TopLine Value=" 14"/>257 <TopLine Value="34"/> 263 258 <CursorPos X="29" Y="31"/> 264 259 <UsageCount Value="313"/> … … 271 266 <IsPartOfProject Value="True"/> 272 267 <UnitName Value="USystem"/> 273 <EditorIndex Value="14"/> 274 <WindowIndex Value="0"/> 275 <TopLine Value="70"/> 276 <CursorPos X="9" Y="91"/> 268 <IsVisibleTab Value="True"/> 269 <EditorIndex Value="8"/> 270 <WindowIndex Value="0"/> 271 <TopLine Value="190"/> 272 <CursorPos X="1" Y="203"/> 277 273 <UsageCount Value="200"/> 278 274 <Loaded Value="True"/> … … 285 281 <ResourceBaseClass Value="DataModule"/> 286 282 <UnitName Value="UCore"/> 287 <EditorIndex Value=" 13"/>288 <WindowIndex Value="0"/> 289 <TopLine Value="4 2"/>290 <CursorPos X=" 60" Y="60"/>283 <EditorIndex Value="7"/> 284 <WindowIndex Value="0"/> 285 <TopLine Value="41"/> 286 <CursorPos X="34" Y="58"/> 291 287 <UsageCount Value="230"/> 292 288 <Loaded Value="True"/> … … 336 332 <IsPartOfProject Value="True"/> 337 333 <UnitName Value="UDataTypes"/> 338 <EditorIndex Value=" 16"/>334 <EditorIndex Value="9"/> 339 335 <WindowIndex Value="0"/> 340 336 <TopLine Value="5"/> 341 <CursorPos X=" 15" Y="18"/>337 <CursorPos X="23" Y="20"/> 342 338 <UsageCount Value="204"/> 343 339 <Loaded Value="True"/> … … 368 364 <TopLine Value="149"/> 369 365 <CursorPos X="44" Y="164"/> 370 <UsageCount Value="15 2"/>366 <UsageCount Value="158"/> 371 367 <DefaultSyntaxHighlighter Value="Delphi"/> 372 368 </Unit22> … … 384 380 <TopLine Value="2393"/> 385 381 <CursorPos X="1" Y="2406"/> 386 <UsageCount Value="2 5"/>382 <UsageCount Value="24"/> 387 383 </Unit24> 388 384 <Unit25> … … 434 430 <TopLine Value="40"/> 435 431 <CursorPos X="29" Y="54"/> 436 <UsageCount Value="10 1"/>432 <UsageCount Value="107"/> 437 433 <DefaultSyntaxHighlighter Value="Delphi"/> 438 434 </Unit30> … … 447 443 <Unit32> 448 444 <Filename Value="../../../Lazarus/0.9.31_2.5.1/lcl/include/customform.inc"/> 449 <EditorIndex Value="15"/>450 445 <WindowIndex Value="0"/> 451 446 <TopLine Value="2102"/> 452 447 <CursorPos X="18" Y="2113"/> 453 <UsageCount Value="32"/> 454 <Loaded Value="True"/> 448 <UsageCount Value="35"/> 455 449 </Unit32> 456 450 <Unit33> … … 475 469 <EditorIndex Value="1"/> 476 470 <WindowIndex Value="0"/> 477 <TopLine Value=" 140"/>478 <CursorPos X="1 " Y="159"/>479 <UsageCount Value="2 0"/>471 <TopLine Value="9"/> 472 <CursorPos X="18" Y="30"/> 473 <UsageCount Value="23"/> 480 474 <Loaded Value="True"/> 481 475 </Unit35> … … 489 483 <TopLine Value="175"/> 490 484 <CursorPos X="3" Y="183"/> 491 <UsageCount Value="5 1"/>485 <UsageCount Value="57"/> 492 486 <DefaultSyntaxHighlighter Value="Delphi"/> 493 487 </Unit36> … … 531 525 <TopLine Value="4"/> 532 526 <CursorPos X="33" Y="19"/> 533 <UsageCount Value=" 45"/>527 <UsageCount Value="51"/> 534 528 <DefaultSyntaxHighlighter Value="Delphi"/> 535 529 </Unit41> … … 568 562 <IsPartOfProject Value="True"/> 569 563 <UnitName Value="UChronisClient"/> 570 <EditorIndex Value=" 12"/>571 <WindowIndex Value="0"/> 572 <TopLine Value=" 11"/>573 <CursorPos X=" 26" Y="40"/>574 <UsageCount Value="4 1"/>564 <EditorIndex Value="6"/> 565 <WindowIndex Value="0"/> 566 <TopLine Value="20"/> 567 <CursorPos X="13" Y="31"/> 568 <UsageCount Value="47"/> 575 569 <Loaded Value="True"/> 576 570 <DefaultSyntaxHighlighter Value="Delphi"/> … … 580 574 <IsPartOfProject Value="True"/> 581 575 <UnitName Value="UChronisServer"/> 582 <EditorIndex Value="10"/>583 576 <WindowIndex Value="0"/> 584 577 <TopLine Value="1"/> 585 578 <CursorPos X="1" Y="14"/> 586 <UsageCount Value="41"/> 587 <Loaded Value="True"/> 579 <UsageCount Value="47"/> 588 580 <DefaultSyntaxHighlighter Value="Delphi"/> 589 581 </Unit47> … … 592 584 <IsPartOfProject Value="True"/> 593 585 <UnitName Value="UChronisClientDirect"/> 594 <IsVisibleTab Value="True"/>595 <EditorIndex Value="9"/>596 586 <WindowIndex Value="0"/> 597 587 <TopLine Value="8"/> 598 <CursorPos X="53" Y="18"/> 599 <UsageCount Value="40"/> 600 <Loaded Value="True"/> 588 <CursorPos X="35" Y="14"/> 589 <UsageCount Value="46"/> 601 590 <DefaultSyntaxHighlighter Value="Delphi"/> 602 591 </Unit48> … … 605 594 <IsPartOfProject Value="True"/> 606 595 <UnitName Value="UChronisModule"/> 607 <EditorIndex Value="1 7"/>596 <EditorIndex Value="10"/> 608 597 <WindowIndex Value="0"/> 609 598 <TopLine Value="1"/> 610 599 <CursorPos X="5" Y="15"/> 611 <UsageCount Value="3 1"/>600 <UsageCount Value="37"/> 612 601 <Loaded Value="True"/> 613 602 <DefaultSyntaxHighlighter Value="Delphi"/> … … 617 606 <IsPartOfProject Value="True"/> 618 607 <UnitName Value="UModuleSystem"/> 619 <EditorIndex Value="1 8"/>608 <EditorIndex Value="11"/> 620 609 <WindowIndex Value="0"/> 621 610 <TopLine Value="54"/> 622 611 <CursorPos X="42" Y="66"/> 623 <UsageCount Value="3 1"/>612 <UsageCount Value="37"/> 624 613 <Loaded Value="True"/> 625 614 <DefaultSyntaxHighlighter Value="Delphi"/> … … 638 627 <TopLine Value="91"/> 639 628 <CursorPos X="1" Y="106"/> 640 <UsageCount Value="1 3"/>629 <UsageCount Value="12"/> 641 630 </Unit52> 642 631 <Unit53> … … 645 634 <TopLine Value="240"/> 646 635 <CursorPos X="1" Y="253"/> 647 <UsageCount Value="1 3"/>636 <UsageCount Value="12"/> 648 637 </Unit53> 649 638 <Unit54> … … 655 644 <EditorIndex Value="5"/> 656 645 <WindowIndex Value="0"/> 657 <TopLine Value=" 62"/>658 <CursorPos X=" 56" Y="79"/>659 <UsageCount Value=" 23"/>646 <TopLine Value="27"/> 647 <CursorPos X="20" Y="73"/> 648 <UsageCount Value="30"/> 660 649 <Loaded Value="True"/> 661 650 <LoadedDesigner Value="True"/> … … 668 657 <TopLine Value="735"/> 669 658 <CursorPos X="17" Y="748"/> 670 <UsageCount Value=" 10"/>659 <UsageCount Value="9"/> 671 660 </Unit55> 672 661 <Unit56> … … 674 663 <IsPartOfProject Value="True"/> 675 664 <UnitName Value="UChronisClientXMLRPC"/> 676 <EditorIndex Value="7"/>677 665 <WindowIndex Value="0"/> 678 666 <TopLine Value="1"/> 679 667 <CursorPos X="1" Y="1"/> 680 <UsageCount Value="20"/> 681 <Loaded Value="True"/> 668 <UsageCount Value="27"/> 682 669 <DefaultSyntaxHighlighter Value="Delphi"/> 683 670 </Unit56> 684 671 <Unit57> 685 <Filename Value="Application/Clients/UChronisMySQL.pas"/> 686 <IsPartOfProject Value="True"/> 687 <UnitName Value="UChronisMySQL"/> 688 <EditorIndex Value="8"/> 672 <Filename Value="Application/Clients/UChronisClientMySQL.pas"/> 673 <IsPartOfProject Value="True"/> 674 <UnitName Value="UChronisClientMySQL"/> 689 675 <WindowIndex Value="0"/> 690 676 <TopLine Value="1"/> 691 <CursorPos X="1" Y="1"/> 692 <UsageCount Value="20"/> 693 <Loaded Value="True"/> 677 <CursorPos X="31" Y="3"/> 678 <UsageCount Value="27"/> 694 679 <DefaultSyntaxHighlighter Value="Delphi"/> 695 680 </Unit57> 681 <Unit58> 682 <Filename Value="Common/URemote.pas"/> 683 <IsPartOfProject Value="True"/> 684 <UnitName Value="URemote"/> 685 <WindowIndex Value="0"/> 686 <TopLine Value="63"/> 687 <CursorPos X="3" Y="74"/> 688 <UsageCount Value="23"/> 689 <DefaultSyntaxHighlighter Value="Delphi"/> 690 </Unit58> 696 691 </Units> 697 <JumpHistory Count=" 30" HistoryIndex="29">692 <JumpHistory Count="13" HistoryIndex="11"> 698 693 <Position1> 699 694 <Filename Value="USystem.pas"/> 700 <Caret Line=" 226" Column="28" TopLine="212"/>695 <Caret Line="91" Column="9" TopLine="70"/> 701 696 </Position1> 702 697 <Position2> 703 698 <Filename Value="USystem.pas"/> 704 <Caret Line=" 223" Column="1" TopLine="197"/>699 <Caret Line="40" Column="3" TopLine="29"/> 705 700 </Position2> 706 701 <Position3> 707 <Filename Value=" Forms/UItemView.pas"/>708 <Caret Line=" 143" Column="14" TopLine="131"/>702 <Filename Value="Application/UChronisClient.pas"/> 703 <Caret Line="47" Column="21" TopLine="23"/> 709 704 </Position3> 710 705 <Position4> 711 <Filename Value=" Forms/UItemView.pas"/>712 <Caret Line=" 44" Column="10" TopLine="33"/>706 <Filename Value="Application/UChronisClient.pas"/> 707 <Caret Line="24" Column="18" TopLine="15"/> 713 708 </Position4> 714 709 <Position5> 715 <Filename Value=" USystem.pas"/>716 <Caret Line=" 223" Column="1" TopLine="210"/>710 <Filename Value="Application/UChronisClient.pas"/> 711 <Caret Line="49" Column="28" TopLine="38"/> 717 712 </Position5> 718 713 <Position6> 719 <Filename Value=" Forms/UItemView.pas"/>720 <Caret Line=" 113" Column="1" TopLine="100"/>714 <Filename Value="Application/UChronisClient.pas"/> 715 <Caret Line="59" Column="44" TopLine="39"/> 721 716 </Position6> 722 717 <Position7> 723 <Filename Value=" Forms/UItemView.pas"/>724 <Caret Line=" 143" Column="1" TopLine="130"/>718 <Filename Value="Application/UChronisClient.pas"/> 719 <Caret Line="55" Column="43" TopLine="39"/> 725 720 </Position7> 726 721 <Position8> 727 <Filename Value=" Forms/UItemView.pas"/>728 <Caret Line=" 44" Column="15" TopLine="31"/>722 <Filename Value="Application/UChronisClient.pas"/> 723 <Caret Line="22" Column="17" TopLine="4"/> 729 724 </Position8> 730 725 <Position9> 731 <Filename Value=" USystem.pas"/>732 <Caret Line=" 223" Column="1" TopLine="210"/>726 <Filename Value="Application/UChronisClient.pas"/> 727 <Caret Line="75" Column="18" TopLine="73"/> 733 728 </Position9> 734 729 <Position10> 735 <Filename Value=" Forms/UItemList.pas"/>736 <Caret Line=" 86" Column="33" TopLine="80"/>730 <Filename Value="Application/UChronisClient.pas"/> 731 <Caret Line="44" Column="5" TopLine="23"/> 737 732 </Position10> 738 733 <Position11> 739 <Filename Value=" Forms/UItemView.pas"/>740 <Caret Line=" 42" Column="24" TopLine="29"/>734 <Filename Value="Application/UChronisClient.pas"/> 735 <Caret Line="131" Column="15" TopLine="121"/> 741 736 </Position11> 742 737 <Position12> 743 <Filename Value="U System.pas"/>744 <Caret Line=" 84" Column="46" TopLine="62"/>738 <Filename Value="UCore.pas"/> 739 <Caret Line="58" Column="39" TopLine="42"/> 745 740 </Position12> 746 741 <Position13> 747 <Filename Value="U System.pas"/>748 <Caret Line=" 91" Column="9" TopLine="70"/>742 <Filename Value="UCore.pas"/> 743 <Caret Line="107" Column="1" TopLine="82"/> 749 744 </Position13> 750 <Position14>751 <Filename Value="Forms/UItemList.pas"/>752 <Caret Line="129" Column="30" TopLine="124"/>753 </Position14>754 <Position15>755 <Filename Value="Forms/UItemView.pas"/>756 <Caret Line="42" Column="24" TopLine="29"/>757 </Position15>758 <Position16>759 <Filename Value="Forms/UItemEdit.pas"/>760 <Caret Line="54" Column="19" TopLine="35"/>761 </Position16>762 <Position17>763 <Filename Value="Forms/UItemAdd.pas"/>764 <Caret Line="31" Column="1" TopLine="17"/>765 </Position17>766 <Position18>767 <Filename Value="Forms/UItemAdd.pas"/>768 <Caret Line="120" Column="28" TopLine="107"/>769 </Position18>770 <Position19>771 <Filename Value="Forms/UItemEdit.pas"/>772 <Caret Line="203" Column="28" TopLine="191"/>773 </Position19>774 <Position20>775 <Filename Value="Forms/UItemEdit.pas"/>776 <Caret Line="135" Column="73" TopLine="122"/>777 </Position20>778 <Position21>779 <Filename Value="Forms/UItemEdit.pas"/>780 <Caret Line="220" Column="41" TopLine="207"/>781 </Position21>782 <Position22>783 <Filename Value="Forms/UItemEdit.pas"/>784 <Caret Line="276" Column="19" TopLine="263"/>785 </Position22>786 <Position23>787 <Filename Value="Forms/UItemView.pas"/>788 <Caret Line="112" Column="20" TopLine="104"/>789 </Position23>790 <Position24>791 <Filename Value="Forms/UItemList.pas"/>792 <Caret Line="119" Column="15" TopLine="112"/>793 </Position24>794 <Position25>795 <Filename Value="Forms/UItemList.pas"/>796 <Caret Line="181" Column="3" TopLine="162"/>797 </Position25>798 <Position26>799 <Filename Value="Forms/UItemList.pas"/>800 <Caret Line="110" Column="6" TopLine="108"/>801 </Position26>802 <Position27>803 <Filename Value="Forms/UMainForm.pas"/>804 <Caret Line="328" Column="74" TopLine="322"/>805 </Position27>806 <Position28>807 <Filename Value="Forms/UMainForm.pas"/>808 <Caret Line="329" Column="94" TopLine="316"/>809 </Position28>810 <Position29>811 <Filename Value="Forms/UItemView.pas"/>812 <Caret Line="117" Column="5" TopLine="104"/>813 </Position29>814 <Position30>815 <Filename Value="../../PascalClassLibrary/Network/CoolWeb/Persistence/USqlDatabase.pas"/>816 <Caret Line="159" Column="1" TopLine="140"/>817 </Position30>818 745 </JumpHistory> 819 746 </ProjectOptions> -
trunk/chronis.lpr
r32 r33 13 13 UImportStructureForm, UItemSelect, ULoginProfileForm, UAboutForm, 14 14 UChronisClient, UChronisServer, UChronisClientDirect, UChronisModule, 15 UModuleSystem, UItemList, LDockTree, UChronisClientXMLRPC, UChronisMySQL 15 UModuleSystem, UItemList, LDockTree, UChronisClientXMLRPC, UChronisClientMySQL, 16 URemote 16 17 { you can add units after this }; 17 18
Note:
See TracChangeset
for help on using the changeset viewer.