Procedure

TfrmOrders.ViewAlertedOrders

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Visibility

Private

Owner

TfrmOrders

Declaration

procedure ViewAlertedOrders(OrderIEN: string; Status: integer; DispGrp: string;
      BySvc, InvDate: boolean; Title: string);

Calls Hierarchy


TfrmOrders.ViewAlertedOrders
 ├DGroupAll
 ├ListDGroupAll
 ├TfrmOrders.SetOrderView
 │ ├TfrmOrders.CanChangeOrderView
 │ │ └ActiveOrdering
 │ ├StrToFMDateTime
 │ ├FMNow
 │ ├TfrmOrders.UseDefaultSort
 │ ├ExpiredOrdersStartDT
 │ └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
 └TNotifications.Delete
   └DeleteAlert

Called-By Hierarchy


     TfrmOrders.ViewAlertedOrders
TfrmOrders.ProcessNotifications┘ 
       TfrmOrders.DisplayPage┘   

Calls

Name Declaration Comments
TNotifications.Delete procedure Delete; -
DGroupAll function DGroupAll: Integer; -
ListDGroupAll procedure ListDGroupAll(Dest: TStrings); -
TfrmOrders.SetOrderView procedure SetOrderView(AFilter, ADGroup: Integer; const AViewName: string; NotifSort: Boolean); -

Called-By

Name Declaration Comments
TfrmOrders.ProcessNotifications procedure ProcessNotifications; -


Source

2567  procedure TfrmOrders.ViewAlertedOrders(OrderIEN: string; Status: integer; DispGrp: string;
2568            BySvc, InvDate: boolean; Title: string);  {**KCM**}
2569  var
2570    i, ADGroup: integer;
2571    DGroups: TStrings;
2572  begin
2573    DGroups := TStringList.Create;
2574    try
2575      ADGroup := DGroupAll;
2576      if Length(DispGrp) > 0 then
2577        begin
2578          ListDGroupAll(DGroups);
2579          for i := 0 to DGroups.Count-1 do
2580            if Piece(DGroups.Strings[i], U, 2) = DispGrp then
2581              ADGroup := StrToIntDef(Piece(DGroups.Strings[i], U, 1),0);
2582        end;
2583    finally
2584      DGroups.Free;
2585    end;
2586    SetOrderView(Status, ADGroup, Title, True);
2587    with lstOrders do
2588      begin
2589        if Length(OrderIEN) > 0 then
2590          begin
2591            for i := 0 to Items.Count-1 do
2592              if Piece(TOrder(Items.Objects[i]).ID, ';', 1) = OrderIEN then
2593                begin
2594                  ItemIndex := i;
2595                  Selected[i] := True;
2596                  break;
2597                end;
2598          end
2599        else for i := 0 to Items.Count-1 do
2600          if Piece(TOrder(Items.Objects[i]).ID, ';', 1) <> '0' then Selected[i] := True;
2601        if SelCount = 0 then Notifications.Delete;
2602      end;
2603  end;