Function

SelectSurgeryView

Module

fSurgeryView

Last Modified

7/15/2014 3:26:38 PM

Scope

Interfaced

Declaration

function SelectSurgeryView(FontSize: Integer; ShowForm: Boolean; CurrentContext: TSurgCaseContext;
          var SurgeryContext: TSurgCaseContext): boolean ;

Calls Hierarchy


SelectSurgeryView
 ├TfrmBase508Form.Create
 │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ ├UnfocusableControlEnter
 │ └AdjustControls
 │   ├TfrmBase508Form.ModifyUnfocusableControl
 │   └..(rec)..
 └TfrmSurgeryView.cmdOKClick
   └StrToFMDateTime

Called-By Hierarchy


                            SelectSurgeryView
                   TfrmSurgery.mnuViewClick┘ 
               TfrmSurgery.SetViewContext┘   
                TfrmSurgery.DisplayPage┤     
TfrmSurgery.mnuViewReturntoDefaultClick┘     

Calls

Name Declaration Comments
TfrmSurgeryView.cmdOKClick procedure cmdOKClick(Sender: TObject); -
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -

Called-By

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


Source

55    function SelectSurgeryView(FontSize: Integer; ShowForm: Boolean; CurrentContext: TSurgCaseContext;
56              var SurgeryContext: TSurgCaseContext): boolean ;
57    var
58      frmSurgeryView: TfrmSurgeryView;
59      W, H: Integer;
60    begin
61      frmSurgeryView := TfrmSurgeryView.Create(Application);
62      try
63        with frmSurgeryView do
64        begin
65          Font.Size := FontSize;
66          W := ClientWidth;
67          H := ClientHeight;
68          ResizeToFont(FontSize, W, H);
69          ClientWidth  := W; pnlBase.Width  := W;
70          ClientHeight := H; pnlBase.Height := H;
71          FChanged := False;
72          FCurrentContext := CurrentContext;
73          calBeginDate.Text := CurrentContext.BeginDate;
74          calEndDate.Text   := CurrentContext.EndDate;
75          if calEndDate.Text = '' then calEndDate.Text := 'TODAY';
76          if CurrentContext.MaxDocs > 0 then
77            edMaxDocs.Text :=  IntToStr(CurrentContext.MaxDocs)
78          else
79            edMaxDocs.Text := '';
80          FMaxDocs := StrToIntDef(edMaxDocs.Text, 0);
81          radTreeSort.ItemIndex := 0;
82          cboGroupBy.SelectByID(CurrentContext.GroupBy);
83          if ShowForm then ShowModal else cmdOKClick(frmSurgeryView);
84    
85          with SurgeryContext do
86           begin
87            Changed := FChanged;
88            OpProc := FOpProc;
89            BeginDate := FBeginDate;
90            FMBeginDate := FFMBeginDate;
91            EndDate := FEndDate;
92            FMEndDate := FFMEndDate;
93            MaxDocs := FMaxDocs;
94            GroupBy := FGroupBy;
95            TreeAscending := FTreeAscending;
96            Result := Changed ;
97          end;
98    
99        end; {with frmSurgeryView}
100     finally
101       frmSurgeryView.Release;
102     end;
103   end;