Procedure

TfrmSignOrders.clstCSOrdersClickCheck

Module

fOrdersSign

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmSignOrders

Declaration

procedure clstCSOrdersClickCheck(Sender: TObject);

Calls Hierarchy


TfrmSignOrders.clstCSOrdersClickCheck
 ├TSigItems.EnableSettings
 │ └TSigItems.TagToItem
 ├updateAllChilds
 │ └TSigItems.EnableSettings...
 ├TfrmSignOrders.CSItemsAreChecked
 ├TfrmSignOrders.nonDCCSItemsAreChecked
 ├TfrmSignOrders.AnyItemsAreChecked
 │ ├TfrmSignOrders.ItemsAreChecked
 │ └TfrmSignOrders.CSItemsAreChecked
 ├TfrmSignOrders.IsSignatureRequired
 └TfrmSignOrders.ItemsAreChecked

Calls

Name Declaration Comments
TfrmSignOrders.AnyItemsAreChecked function AnyItemsAreChecked: Boolean; -
TfrmSignOrders.CSItemsAreChecked function CSItemsAreChecked: Boolean; -
TSigItems.EnableSettings procedure EnableSettings(Index: integer; Checked: boolean); -
TfrmSignOrders.IsSignatureRequired function IsSignatureRequired:boolean; -
TfrmSignOrders.ItemsAreChecked function ItemsAreChecked: Boolean; -
TfrmSignOrders.nonDCCSItemsAreChecked function nonDCCSItemsAreChecked: Boolean; -
updateAllChilds procedure updateAllChilds(CheckedStatus: boolean; ParentOrderId: string); -


Source

1684  procedure TfrmSignOrders.clstCSOrdersClickCheck(Sender: TObject);
1685  
1686     procedure updateAllChilds(CheckedStatus: boolean; ParentOrderId: string);
1687     var
1688       idx: integer;
1689     begin
1690       for idx := 0 to clstCSOrders.Items.Count - 1 do
1691          if TOrder(clstCSOrders.Items.Objects[idx]).ParentID = ParentOrderId then
1692          begin
1693             if clstCSOrders.Checked[idx] <> CheckedStatus then
1694             begin
1695                clstCSOrders.Checked[idx] := CheckedStatus;
1696                SigItemsCS.EnableSettings(idx, clstCSOrders.checked[Idx]);
1697             end;
1698          end;
1699     end;
1700  
1701  begin
1702    with clstCSOrders do
1703    begin
1704      if Length(TOrder(Items.Objects[ItemIndex]).ParentID)>0 then
1705      begin
1706        SigItemsCS.EnableSettings(ItemIndex, checked[ItemIndex]);
1707        updateAllChilds(checked[ItemIndex],TOrder(Items.Objects[ItemIndex]).ParentID);
1708      end else
1709        SigItemsCS.EnableSettings(ItemIndex, checked[ItemIndex]);
1710    end;
1711    if CSItemsAreChecked and nonDCCSItemsAreChecked then
1712    begin
1713       lblDeaText.Visible := TRUE;
1714       lblSmartCardNeeded.Visible := TRUE;
1715    end
1716    else
1717    begin
1718       lblDeaText.Visible := FALSE;
1719       lblSmartCardNeeded.Visible := FALSE;
1720    end;
1721    if AnyItemsAreChecked then
1722    begin
1723       lblESCode.Visible := IsSignatureRequired;
1724       txtESCode.Visible := IsSignatureRequired
1725    end
1726    else
1727    begin
1728      lblESCode.Visible := ItemsAreChecked or CSItemsAreChecked;
1729      txtESCode.Visible := ItemsAreChecked or CSItemsAreChecked;
1730    end;
1731    if txtESCode.Visible then txtESCode.SetFocus;
1732  end;