Procedure

TfrmODDiet.calOPStopChange

Module

fODDiet

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmODDiet

Declaration

procedure calOPStopChange(Sender: TObject);

Calls Hierarchy


TfrmODDiet.calOPStopChange
 ├TfrmODDiet.SetEnableOPDOW
 ├TfrmODDiet.FMDOW
 ├TfrmODDiet.FMDays
 └TfrmODDiet.OPChange
   ├TResponses.Clear
   ├TResponses.Update
   │ ├TResponses.FindResponseByName
   │ └TResponses.IENForPrompt
   ├TfrmODDiet.GetOPDaysOfWeek
   └TResponses.GetOrderText
     ├TResponses.NextInstance
     ├TResponses.FindResponseByName
     ├TResponses.FormatResponse
     │ └TResponses.FindResponseByIEN
     └TResponses.AppendChildren
       ├TResponses.FindPromptByIEN
       ├TResponses.FindResponseByIEN
       └TResponses.FormatResponse...

Called-By Hierarchy


               TfrmODDiet.calOPStopChange
    TfrmODDiet.SetValuesFromResponsesOP┘ 
               TfrmODDiet.SetupDialog┤   
  TfrmODDiet.cboOPDietAvailMouseClick┘   
           TfrmODDiet.nbkDietChange┤     
            TfrmODDiet.InitDialog┤ │     
           TfrmODDiet.SetupDialog┤ │     
                        ..(rec)..┘ │     
      TfrmODDiet.cboOPDietAvailExit┤     
   TfrmODDiet.cboOPDietAvailKeyDown┘     

Calls

Name Declaration Comments
TfrmODDiet.FMDays function FMDays(AStart, AEnd: TFMDateTime): string; -
TfrmODDiet.FMDOW function FMDOW(AnFMDate: TFMDateTime): integer; -
TfrmODDiet.OPChange procedure OPChange(Sender: TObject); -
TfrmODDiet.SetEnableOPDOW procedure SetEnableOPDOW(AllowUse: Boolean; OneTimeDay: integer; DaysToCheck: string = ''); -

Called-By

Name Declaration Comments
TfrmODDiet.SetValuesFromResponsesOP procedure SetValuesFromResponsesOP; -


Source

2057  procedure TfrmODDiet.calOPStopChange(Sender: TObject);
2058  var
2059    Days: string;
2060  begin
2061    inherited;
2062    if Changing then exit;
2063    if not (calOPStop.FMDateTime > 0) then
2064    begin
2065      SetEnableOPDOW(False, -1);
2066      Exit ;
2067    end;
2068    if (Length(calOPStop.Text) > 0) and (calOPStop.FMDateTime = calOPStart.FMDateTime) then
2069      SetEnableOPDOW(False, FMDOW(calOPStart.FMDateTime))
2070    else
2071    begin
2072      Days := FMDays(calOPStart.FMDateTime, calOPStop.FMDateTime);
2073      SetEnableOPDOW(True, -1, Days);
2074    end;
2075    OPChange(Sender);
2076  end;