Procedure

TfrmOrders.mnuActCommentClick

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

Loop thru selected orders, allowing ward comments to be edited for each

Visibility

Public/Published

Owner

TfrmOrders

Declaration

procedure mnuActCommentClick(Sender: TObject);

Calls Hierarchy


TfrmOrders.mnuActCommentClick
 ├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
 └ExecuteWardComments
   ├TfrmBase508Form.Create
   │ ├TfrmBase508Form.UpdateAccessibilityActions
   │ ├UnfocusableControlEnter
   │ └AdjustControls
   │   ├TfrmBase508Form.ModifyUnfocusableControl
   │   └..(rec)..
   ├LoadWardComments
   └PutWardComments

Calls

Name Declaration Comments
AuthorizedUser function AuthorizedUser: Boolean; -
ExecuteWardComments function ExecuteWardComments(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

2115  procedure TfrmOrders.mnuActCommentClick(Sender: TObject);
2116  { loop thru selected orders, allowing ward comments to be edited for each }
2117  var
2118    i: Integer;
2119    AnOrder: TOrder;
2120    ErrMsg: string;
2121  begin
2122    inherited;
2123    if NoneSelected(TX_NOSEL) then Exit;
2124    if not AuthorizedUser then Exit;
2125    if (FCurrentView.EventDelay.PtEventIFN>0) and (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName)) then
2126      Exit;
2127    with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then
2128    begin
2129      AnOrder := TOrder(Items.Objects[i]);
2130      ValidateOrderAction(AnOrder.ID, OA_COMMENT, ErrMsg);
2131      if Length(ErrMsg) > 0
2132        then InfoBox(AnOrder.Text + TX_NO_CMNT + ErrMsg, TC_NO_CMNT, MB_OK)
2133        else ExecuteWardComments(AnOrder);
2134      Selected[i] := False;
2135    end;
2136  end;