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