Changeset 40 for trunk/Application


Ignore:
Timestamp:
Mar 9, 2012, 8:11:13 AM (13 years ago)
Author:
chronos
Message:
  • Added: Remember last password in login dialog.
  • Fixed: Some Add, Edit, View, Select dialog display.
Location:
trunk/Application
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Clients/UChronisClientMySQL.pas

    r38 r40  
    8888      NewObject := TObjectProxy.Create;
    8989      NewObject.Client := AList.Client;
     90      NewObject.ObjectName := AList.ObjectName;
     91      NewObject.SchemaName := AList.SchemaName;
    9092      NewObject.Properties.Assign(TDictionaryStringString(DbRows[I]));
    9193      AList.Objects.Add(NewObject);
  • trunk/Application/UDataTypes.pas

    r37 r40  
    1414
    1515  TDataType = class
     16    Name: string;
    1617    CustomType: Integer;
    1718    Control: TWinControl;
     
    2324    procedure SetDefault; virtual;
    2425    function GetStringValue: string; virtual;
     26    constructor Create; virtual;
    2527  end;
    2628
     
    3739    procedure Load(CellValue: string); override;
    3840    procedure LoadDef(CustomType: Integer); override;
     41    constructor Create; override;
    3942  end;
    4043
     
    4952    function GetControlValue(Control: TWinControl): string; override;
    5053    procedure Load(CellValue: string); override;
     54    constructor Create; override;
    5155  end;
    5256
     
    6064    procedure SetupControl(Control: TWinControl); override;
    6165    procedure Load(CellValue: string); override;
     66    constructor Create; override;
    6267  end;
    6368
     
    7176    procedure SetupControl(Control: TWinControl); override;
    7277    procedure Load(CellValue: string); override;
     78    constructor Create; override;
    7379  end;
    7480
     
    8692    procedure Load(CellValue: string); override;
    8793    procedure LoadDef(ACustomType: Integer); override;
     94    constructor Create; override;
    8895  end;
    8996
     
    99106    procedure Load(CellValue: string); override;
    100107    procedure LoadDef(ACustomType: Integer); override;
     108    constructor Create; override;
    101109  end;
    102110
     
    112120    procedure SetupControl(Control: TWinControl); override;
    113121    procedure Load(CellValue: string); override;
     122    constructor Create; override;
    114123  end;
    115124
     
    123132    procedure SetupControl(Control: TWinControl); override;
    124133    procedure Load(CellValue: string); override;
     134    constructor Create; override;
    125135  end;
    126136
     
    136146    procedure SetupControl(Control: TWinControl); override;
    137147    procedure Load(CellValue: string); override;
     148    constructor Create; override;
    138149  end;
    139150
     
    144155
    145156uses
    146   USqlDatabase, USystem, UCore, UItemSelect;
     157  USqlDatabase, USystem, UCore, UItemSelect, UMainForm;
    147158
    148159function GetDataType(ACustomType: Integer): TDataType;
     
    216227end;
    217228
     229constructor TDataTypeDateTime.Create;
     230begin
     231  inherited Create;
     232  Name := 'DateType';
     233end;
     234
    218235{ TDataTypeRelationMany }
    219236
    220237function TDataTypeRelationMany.CreateControl(Owner: TComponent): TWinControl;
    221238begin
    222   Result:=inherited CreateControl(Owner);
     239  Result := inherited CreateControl(Owner);
    223240end;
    224241
     
    260277end;
    261278
     279constructor TDataTypeRelationMany.Create;
     280begin
     281  inherited Create;
     282  Name := 'RelationMany';
     283end;
     284
    262285{ TDataTypeRelationOne }
    263286
    264287procedure TDataTypeRelationOne.ButtonClickExecute(Sender: TObject);
    265 begin
    266   ItemSelectForm.ObjectId := ObjectId;
    267   ItemSelectForm.ShowModal;
    268   TEditButton(Control).Text := IntToStr(ItemSelectForm.SelectedId)
     288var
     289  NewSelectForm: TItemSelectForm;
     290begin
     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;
    269299end;
    270300
     
    309339end;
    310340
     341constructor TDataTypeRelationOne.Create;
     342begin
     343  inherited Create;
     344  Name := 'RelationOne';
     345end;
     346
    311347
    312348{ TDataTypePassword }
     
    327363end;
    328364
     365constructor TDataTypePassword.Create;
     366begin
     367  inherited Create;
     368  Name := 'Password';
     369end;
     370
    329371{ TDataTypeFloat }
    330372
     
    349391end;
    350392
     393constructor TDataTypeFloat.Create;
     394begin
     395  inherited Create;
     396  Name := 'Float';
     397end;
     398
    351399{ TDataTypeDateTime }
    352400
     
    371419end;
    372420
     421constructor TDataTypeDate.Create;
     422begin
     423  inherited Create;
     424  Name := 'Date';
     425end;
     426
    373427{ TDataTypeBoolean }
    374428
     
    391445begin
    392446  Value := Boolean(StrToInt(CellValue));
     447end;
     448
     449constructor TDataTypeBoolean.Create;
     450begin
     451  inherited Create;
     452  Name := 'Boolean';
    393453end;
    394454
     
    422482end;
    423483
     484constructor TDataTypeNumber.Create;
     485begin
     486  inherited Create;
     487  Name := 'Number';
     488end;
     489
    424490{ TDataTypeString }
    425491
     
    444510end;
    445511
     512constructor TDataTypeString.Create;
     513begin
     514  inherited Create;
     515  Name := 'String';
     516end;
     517
    446518{ TDataType }
    447519
     
    481553end;
    482554
     555constructor TDataType.Create;
     556begin
     557  inherited;
     558end;
     559
    483560end.
    484561
Note: See TracChangeset for help on using the changeset viewer.