Procedure

TfrmOrders.mnuViewCustomClick

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmOrders

Declaration

procedure mnuViewCustomClick(Sender: TObject);

Calls Hierarchy


TfrmOrders.mnuViewCustomClick
 ├TfrmOrders.CanChangeOrderView
 │ └ActiveOrdering
 ├TOrderView.Assign
 ├SelectOrderView
 │ ├TfrmBase508Form.Create
 │ │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ │ ├UnfocusableControlEnter
 │ │ └AdjustControls
 │ │   ├TfrmBase508Form.ModifyUnfocusableControl
 │ │   └..(rec)..
 │ └TfrmOrderView.SynchViewData
 │   ├TfrmOrderView.chkDateRangeClick
 │   │ └TfrmOrderView.UpdateViewName
 │   └TfrmOrderView.UpdateViewName
 ├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

Calls

Name Declaration Comments
TOrderView.Assign procedure Assign(Src: TOrderView); -
TfrmOrders.CanChangeOrderView function CanChangeOrderView: Boolean; -
LoadWriteOrders procedure LoadWriteOrders(Dest: TStrings); -
TfrmOrders.RefreshOrderList procedure RefreshOrderList(FromServer: Boolean; APtEvtID: string = ''); -
SelectOrderView procedure SelectOrderView(var OrderView: TOrderView); -


Source

910   procedure TfrmOrders.mnuViewCustomClick(Sender: TObject);
911   var
912     AnOrderView: TOrderView;
913   begin
914     inherited;
915     if not CanChangeOrderView then Exit;
916     AnOrderView := TOrderView.Create;              //       - this starts fresh instead, since CPRS v22
917     try
918       AnOrderView.Assign(FCurrentView);              // RV - v27.1 - preload form with current view params
919     (*  AnOrderView.Filter    := STS_ACTIVE;                    - CQ #11261
920       AnOrderView.DGroup    := DGroupAll;
921       AnOrderView.ViewName  := 'All Services, Active';
922       AnOrderView.InvChrono := True;
923       AnOrderView.ByService := True;
924       AnOrderView.CtxtTime  := 0;
925       AnOrderView.TextView  := 0;
926       AnOrderView.EventDelay.EventType := 'C';
927       AnOrderView.EventDelay.Specialty := 0;
928       AnOrderView.EventDelay.Effective := 0;
929       AnOrderView.EventDelay.EventIFN  := 0;
930       AnOrderView.EventDelay.EventName := 'All Services, Active';*)
931       SelectOrderView(AnOrderView);
932       with AnOrderView do if Changed then
933       begin
934         FCurrentView.Assign(AnOrderView);
935         if FCurrentView.Filter in [15,16,17,24] then
936         begin
937           FCompress      := False;
938           mnuActRel.Visible   := True;
939           popOrderRel.Visible := True;
940         end else
941         begin
942           mnuActRel.Visible   := False;
943           popOrderRel.Visible := False;
944         end;
945   
946         //lstSheets.ItemIndex := -1;
947         lstSheets.Items[0] := 'C;0^' + FCurrentView.ViewName;   // v27.5 - RV
948   
949         lblWrite.Caption := 'Write Orders';
950         lstWrite.Clear;
951         lstWrite.Caption := lblWrite.Caption;
952         LoadWriteOrders(lstWrite.Items);
953         RefreshOrderList(FROM_SERVER);
954   
955         if ByService then
956         begin
957           if InvChrono then FDfltSort := OVS_CATINV  else FDfltSort := OVS_CATFWD;
958         end else
959         begin
960           if InvChrono then FDfltSort := OVS_INVERSE else FDfltSort := OVS_FORWARD;
961         end;
962       end;
963     finally
964       AnOrderView.free;
965     end;
966   end;