Procedure

TfrmPtSelOptns.ShowDateRange

Module

fPtSelOptns

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmPtSelOptns

Declaration

procedure ShowDateRange;

Calls Hierarchy


TfrmPtSelOptns.ShowDateRange
 ├ListDateRangeClinic
 └DfltDateRangeClinic

Called-By Hierarchy


    TfrmPtSelOptns.ShowDateRange
TfrmPtSelOptns.radLongSrcClick┘ 

Calls

Name Declaration Comments
DfltDateRangeClinic function DfltDateRangeClinic: string; -
ListDateRangeClinic procedure ListDateRangeClinic(Dest: TStrings); -

Called-By

Name Declaration Comments
TfrmPtSelOptns.radLongSrcClick procedure radLongSrcClick(Sender: TObject); -


Source

266   procedure TfrmPtSelOptns.ShowDateRange;
267   var
268     DateString, DRStart, DREnd: string;
269     TStart, TEnd: boolean;
270   begin
271     with cboDateRange do if Items.Count = 0 then
272     begin
273       ListDateRangeClinic(Items);
274       ItemIndex := 0;
275     end;
276     DateString := DfltDateRangeClinic; // Returns "^T" even if no settings.
277     DRStart := piece(DateString,U,1);
278     DREnd := piece(DateString,U,2);
279     if (DRStart <> ' ') then
280       begin
281         TStart := false;
282         TEnd := false;
283         if ((DRStart = 'T') or (DRStart = 'TODAY')) then
284           TStart := true;
285         if ((DREnd = 'T') or (DREnd = 'TODAY')) then
286           TEnd := true;
287         if not (TStart and TEnd) then
288           cboDateRange.ItemIndex := cboDateRange.Items.Add(DRStart + ';' +
289             DREnd + U + DRStart + ' to ' + DREnd);
290       end;
291     cboList.Height := lblDateRange.Top - cboList.Top - 4;
292     lblDateRange.Show;
293     cboDateRange.Show;
294   end;