Procedure

TfrmOrders.mnuActFlagClick

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmOrders

Declaration

procedure mnuActFlagClick(Sender: TObject);

Calls Hierarchy


TfrmOrders.mnuActFlagClick
 ├TfrmOrders.NoneSelected
 ├AuthorizedUser
 ├TfrmOrders.PtEvtCompleted
 │ ├IsCompletedPtEvt
 │ ├TfrmOrders.GroupChangesUpdate
 │ │ ├TChanges.ChangeOrderGrp
 │ │ └TChanges.ReplaceODGrpName
 │ ├TfrmOrders.InitOrderSheetsForEvtDelay
 │ │ ├TfrmOrders.InitOrderSheets
 │ │ │ ├TfrmOrders.ClearOrderSheets
 │ │ │ ├LoadOrderSheetsED
 │ │ │ ├DGroupAll
 │ │ │ └EventInfo
 │ │ └TfrmOrders.DfltViewForEvtDelay
 │ │   ├TfrmOrders.CanChangeOrderView
 │ │   │ └ActiveOrdering
 │ │   └LoadOrderViewDefault
 │ ├TfrmOrders.lstSheetsClick
 │ │ ├CloseOrdering
 │ │ ├TfrmOrders.PtEvtCompleted...
 │ │ ├DeleteEmptyEvt
 │ │ │ ├PtEvtEmpty
 │ │ │ ├GetEventName
 │ │ │ └DeletePtEvent
 │ │ ├TfrmOrders.ChangesUpdate
 │ │ │ ├TheParentPtEvt
 │ │ │ └TChanges.Remove
 │ │ │   ├UnlockOrder
 │ │ │   └UnlockDocument
 │ │ ├TfrmOrders.InitOrderSheetsForEvtDelay...
 │ │ ├..(rec)..
 │ │ ├LoadWriteOrdersED
 │ │ ├LoadWriteOrders
 │ │ ├TfrmOrders.RefreshOrderList
 │ │ │ ├LoadOrdersAbbr
 │ │ │ │ ├ClearOrders
 │ │ │ │ ├LoadDGroupMap
 │ │ │ │ ├ExpiredOrdersStartDT
 │ │ │ │ ├FMNow
 │ │ │ │ └SeqOfDGroup
 │ │ │ │   └LoadDGroupMap
 │ │ │ ├ClearOrders
 │ │ │ ├LoadOrdersAbbr
 │ │ │ │ ├LoadDGroupMap
 │ │ │ │ ├FMNow
 │ │ │ │ └SeqOfDGroup...
 │ │ │ ├TfrmOrders.ExpandEventSection
 │ │ │ ├TfrmOrders.CompressEventSection
 │ │ │ ├SortOrders
 │ │ │ │ ├InverseByGroup
 │ │ │ │ │ └TChanges.Exist
 │ │ │ │ ├ForwardByGroup
 │ │ │ │ │ └TChanges.Exist
 │ │ │ │ ├InverseChrono
 │ │ │ │ └ForwardChrono
 │ │ │ ├TfrmOrders.AddToListBox
 │ │ │ │ └TfrmOrders.GetPlainText
 │ │ │ │   └TfrmOrders.GetOrderText
 │ │ │ │     ├LoadFlagReason
 │ │ │ │     ├TfrmOrders.GetStartStopText
 │ │ │ │     └NameOfStatus
 │ │ │ └DGroupAll
 │ │ ├PtEvtEmpty
 │ │ └DeletePtEvent
 │ └TfrmOrders.RefreshOrderList...
 ├ValidateOrderAction
 └ExecuteFlagOrder
   ├TfrmBase508Form.Create
   │ ├TfrmBase508Form.UpdateAccessibilityActions
   │ ├UnfocusableControlEnter
   │ └AdjustControls
   │   ├TfrmBase508Form.ModifyUnfocusableControl
   │   └..(rec)..
   └FlagOrder
     └SetOrderFromResults
       └SetOrderFields
         ├TOrder.Clear
         ├SeqOfDGroup...
         └TopNameOfDGroup
           └LoadDGroupMap

Calls

Name Declaration Comments
AuthorizedUser function AuthorizedUser: Boolean; -
ExecuteFlagOrder function ExecuteFlagOrder(AnOrder: TOrder): Boolean; -
TfrmOrders.NoneSelected function NoneSelected(const ErrMsg: string): Boolean; -
TfrmOrders.PtEvtCompleted function PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean = False; Signing: boolean = False): boolean; -
ValidateOrderAction procedure ValidateOrderAction(const ID, Action: string; var ErrMsg: string); -


Source

2017  procedure TfrmOrders.mnuActFlagClick(Sender: TObject);
2018  var
2019    i: Integer;
2020    AnOrder: TOrder;
2021    ErrMsg: string;
2022  begin
2023    inherited;
2024    if NoneSelected(TX_NOSEL) then Exit;
2025    if not AuthorizedUser then Exit;
2026    if (FCurrentView.EventDelay.PtEventIFN>0) and (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName)) then
2027      Exit;
2028    with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
2029    begin
2030      AnOrder := TOrder(Items.Objects[i]);
2031      ValidateOrderAction(AnOrder.ID, OA_FLAG, ErrMsg);
2032      if Length(ErrMsg) > 0
2033        then InfoBox(AnOrder.Text + TX_NO_FLAG + ErrMsg, TC_NO_FLAG, MB_OK)
2034        else ExecuteFlagOrder(AnOrder);
2035      Selected[i] := False;
2036    end;
2037    lstOrders.Invalidate;
2038  end;