source: cprs/branches/tmg-cprs/CPRS-Chart/fEffectDate.pas@ 792

Last change on this file since 792 was 453, checked in by Kevin Toppenberg, 16 years ago

Initial upload of TMG-CPRS 1.0.26.69

File size: 1.6 KB
Line 
1//kt -- Modified with SourceScanner on 7/17/2007
2unit fEffectDate;
3
4interface
5
6uses
7 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
8 fAutoSz, Grids, Calendar, ORDtTmCal, StdCtrls, ORDtTm, ORFn, DKLang;
9
10type
11 TfrmEffectDate = class(TfrmAutoSz)
12 calEffective: TORDateBox;
13 Label2: TLabel;
14 Label3: TStaticText;
15 Label4: TStaticText;
16 cmdOK: TButton;
17 cmdCancel: TButton;
18 DKLanguageController2: TDKLanguageController;
19 procedure FormCreate(Sender: TObject);
20 procedure cmdOKClick(Sender: TObject);
21 procedure cmdCancelClick(Sender: TObject);
22 private
23 OKPressed: Boolean;
24 end;
25
26function ObtainEffectiveDate(var ADate: TFMDateTime): Boolean;
27
28implementation
29
30{$R *.DFM}
31
32function ObtainEffectiveDate(var ADate: TFMDateTime): Boolean;
33var
34 frmEffectDate: TfrmEffectDate;
35begin
36 Result := False;
37 frmEffectDate := TfrmEffectDate.Create(Application);
38 try
39 ResizeFormToFont(TForm(frmEffectDate));
40 if ADate <> 0 then frmEffectDate.calEffective.FMDateTime := ADate;
41 frmEffectDate.ShowModal;
42 if frmEffectDate.OKPressed then
43 begin
44 ADate := frmEffectDate.calEffective.FMDateTime;
45 Result := True;
46 end;
47 finally
48 frmEffectDate.Release;
49 end;
50end;
51
52procedure TfrmEffectDate.FormCreate(Sender: TObject);
53begin
54 inherited;
55 OKPressed := False;
56end;
57
58procedure TfrmEffectDate.cmdOKClick(Sender: TObject);
59begin
60 inherited;
61 OKPressed := True;
62 Close;
63end;
64
65procedure TfrmEffectDate.cmdCancelClick(Sender: TObject);
66begin
67 inherited;
68 Close;
69end;
70
71end.
Note: See TracBrowser for help on using the repository browser.