Module

fEffectDate

Path

C:\CPRS\CPRS30\fEffectDate.pas

Last Modified

7/15/2014 3:26:36 PM

Units Used in Interface

Name Comments
fAutoSz -

Classes

Name Comments
TfrmEffectDate -

Procedures

Name Owner Declaration Scope Comments
cmdCancelClick TfrmEffectDate procedure cmdCancelClick(Sender: TObject); Public/Published -
cmdOKClick TfrmEffectDate procedure cmdOKClick(Sender: TObject); Public/Published -
FormCreate TfrmEffectDate procedure FormCreate(Sender: TObject); Public/Published -

Functions

Name Owner Declaration Scope Comments
ObtainEffectiveDate - function ObtainEffectiveDate(var ADate: TFMDateTime): Boolean; Interfaced -


Module Source

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       VA508AccessibilityManager;
9     
10    type
11      TfrmEffectDate = class(TfrmAutoSz)
12        calEffective: TORDateBox;
13        Label2: TLabel;
14        Label3: TStaticText;
15        Label4: TStaticText;
16        cmdOK: TButton;
17        cmdCancel: TButton;
18        procedure FormCreate(Sender: TObject);
19        procedure cmdOKClick(Sender: TObject);
20        procedure cmdCancelClick(Sender: TObject);
21      private
22        OKPressed: Boolean;
23      end;
24    
25    function ObtainEffectiveDate(var ADate: TFMDateTime): Boolean;
26    
27    implementation
28    
29    {$R *.DFM}
30    
31    function ObtainEffectiveDate(var ADate: TFMDateTime): Boolean;
32    var
33      frmEffectDate: TfrmEffectDate;
34    begin
35      Result := False;
36      frmEffectDate := TfrmEffectDate.Create(Application);
37      try
38        ResizeFormToFont(TForm(frmEffectDate));
39        if ADate <> 0 then frmEffectDate.calEffective.FMDateTime := ADate;
40        frmEffectDate.ShowModal;
41        if frmEffectDate.OKPressed then
42        begin
43          ADate  := frmEffectDate.calEffective.FMDateTime;
44          Result := True;
45        end;
46      finally
47        frmEffectDate.Release;
48      end;
49    end;
50    
51    procedure TfrmEffectDate.FormCreate(Sender: TObject);
52    begin
53      inherited;
54      OKPressed := False;
55    end;
56    
57    procedure TfrmEffectDate.cmdOKClick(Sender: TObject);
58    begin
59      inherited;
60      OKPressed := True;
61      Close;
62    end;
63    
64    procedure TfrmEffectDate.cmdCancelClick(Sender: TObject);
65    begin
66      inherited;
67      Close;
68    end;
69    
70    end.

Module Calls (2 levels)


fEffectDate
 └fAutoSz
   └fBase508Form

Module Called-By (2 levels)


            fEffectDate
              fOrders┘ 
            uOrders┤   
            fODBase┤   
             fFrame┤   
              rMisc┤   
            uODBase┤   
              fMeds┤   
          fOrdersDC┤   
          fOrdersCV┤   
            fOMNavA┤   
             fOMSet┤   
 fOrdersEvntRelease┤   
    fODReleaseEvent┤   
         mEvntDelay┤   
          fODActive┤   
        fOrdersCopy┤   
           fMedCopy┤   
fActivateDeactivate┘