Function

SelectConsultDateRange

Module

fConsultBD

Last Modified

7/15/2014 3:26:34 PM

Comments

Displays date range select form for progress Consults and returns a record of the selection

Scope

Interfaced

Declaration

function SelectConsultDateRange(FontSize: Integer; CurrentContext: TSelectContext; var ConsultDateRange: TConsultDateRange): boolean;

Calls Hierarchy


SelectConsultDateRange
 └TfrmBase508Form.Create
   ├TfrmBase508Form.UpdateAccessibilityActions
   ├UnfocusableControlEnter
   └AdjustControls
     ├TfrmBase508Form.ModifyUnfocusableControl
     └..(rec)..

Called-By Hierarchy


                        SelectConsultDateRange
                   TfrmConsults.mnuViewClick┘ 
               TfrmConsults.SetViewContext┘   
                TfrmConsults.DisplayPage┤     
TfrmConsults.mnuViewReturntoDefaultClick┘     

Calls

Name Declaration Comments
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -

Called-By

Name Declaration Comments
TfrmConsults.mnuViewClick procedure mnuViewClick(Sender: TObject); -


Source

50    function SelectConsultDateRange(FontSize: Integer; CurrentContext: TSelectContext; var ConsultDateRange: TConsultDateRange): boolean;
51    { displays date range select form for progress Consults and returns a record of the selection }
52    var
53      frmConsultsByDate: TfrmConsultsByDate;
54      W, H: Integer;
55      CurrentBegin, CurrentEnd: string;
56    begin
57      frmConsultsByDate := TfrmConsultsByDate.Create(Application);
58      try
59        with frmConsultsByDate do
60        begin
61          Font.Size := FontSize;
62          W := ClientWidth;
63          H := ClientHeight;
64          ResizeToFont(FontSize, W, H);
65          ClientWidth  := W; pnlBase.Width  := W;
66          ClientHeight := H; pnlBase.Height := H;
67          FChanged := False;
68          with radSort do {if SortConsultsAscending then ItemIndex := 0 else} ItemIndex := 1;
69          CurrentBegin := CurrentContext.BeginDate;
70          CurrentEnd := CurrentContext.EndDate;
71          if CurrentBegin <> '' then
72            calBeginDate.Text := CurrentBegin;
73          if CurrentEnd <> '' then
74            calEndDate.Text := CurrentEnd;
75          if calEndDate.Text = '' then calEndDate.Text := 'TODAY';
76          ShowModal;
77          with ConsultDateRange do
78          begin
79            Changed := FChanged;
80            BeginDate := FBeginDate;
81            EndDate := FEndDate;
82            Ascending := FAscending;
83            Result := Changed ;
84          end; {with ConsultDateRange}
85        end; {with frmConsultsByDate}
86      finally
87        frmConsultsByDate.Release;
88      end;
89    end;