Function

CompleteEvt

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

function CompleteEvt(APtEvntID: string; APtEvntName: string; Ask: boolean = True): boolean;

Calls Hierarchy


CompleteEvt
 ├PtEvtEmpty
 └GetEventName

Called-By Hierarchy


                  CompleteEvt
  ExecuteReleaseEventOrders┘ 
TfrmOrders.mnuActRelClick┘   

Calls

Name Declaration Comments
GetEventName function GetEventName(const AEvntID: string): string; -
PtEvtEmpty function PtEvtEmpty(APtEvtID: string): Boolean; -

Called-By

Name Declaration Comments
ExecuteReleaseEventOrders function ExecuteReleaseEventOrders(AnOrderList: TList): boolean; -


Source

2193  function CompleteEvt(APtEvntID: string; APtEvntName: string; Ask: boolean): boolean;
2194  const
2195    TX_EVTFIN1 = 'All of the orders tied to ';
2196    TX_EVTFIN2 = ' have been released to a service, ' + #13 + 'Would you like to terminate this event?';
2197  var
2198    ThePtEvtName: string;
2199  begin
2200    Result := false;
2201    if APtEvntID = '0' then
2202    begin
2203      Result := True;
2204      Exit;
2205    end;
2206    if PtEvtEmpty(APtEvntID) then
2207    begin
2208      if Length(APtEvntName)=0 then
2209        ThePtEvtName := GetEventName(APtEvntID)
2210      else
2211        ThePtEvtName := APtEvntName;
2212      if Ask then
2213      begin
2214        if InfoBox(TX_EVTFIN1 + ThePtEvtName + TX_EVTFIN2, 'Confirmation', MB_OKCANCEL or MB_ICONQUESTION) = IDOK then
2215        begin
2216          SCallV('OREVNTX1 DONE',[APtEvntID]);
2217          Result := True;
2218        end;
2219      end else
2220      begin
2221        SCallV('OREVNTX1 DONE',[APtEvntID]);
2222        Result := True;
2223      end;
2224    end;
2225  end;