Procedure

TfrmRemCoverSheet.cbEditLevelClick

Module

fRemCoverSheet

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmRemCoverSheet

Declaration

procedure cbEditLevelClick(Sender: TObject);

Calls Hierarchy


TfrmRemCoverSheet.cbEditLevelClick
 ├TfrmRemCoverSheet.GetExternalName
 │ └GetNameFromList
 │   └ExternalName
 ├TfrmRemCoverSheet.SetButtonHints
 ├TfrmRemCoverSheet.UpdateView
 │ └TfrmRemCoverSheet.GetCurrent
 │   └TfrmRemCoverSheet.GetCoverSheetLvlData
 │     └GetCoverSheetLevelData
 └TfrmRemCoverSheet.UpdateMasterListView
   ├TfrmRemCoverSheet.GetCurrent...
   └TfrmRemCoverSheet.UpdateButtons
     ├TfrmRemCoverSheet.GetCurrent...
     ├TfrmRemCoverSheet.GetIndex
     └TfrmRemCoverSheet.LockButtonUpdate
       ├TfrmRemCoverSheet.btnLockClick
       │ └TfrmRemCoverSheet.ChangeStatus
       │   ├TfrmRemCoverSheet.GetCurrent...
       │   ├TfrmRemCoverSheet.GetIndex
       │   ├TfrmRemCoverSheet.MarkListAsChanged
       │   │ └TfrmRemCoverSheet.UpdateView...
       │   ├TfrmRemCoverSheet.SetupItem
       │   └TfrmRemCoverSheet.LockButtonUpdate...
       └TfrmRemCoverSheet.btnAddClick
         └TfrmRemCoverSheet.ChangeStatus...

Called-By Hierarchy


     TfrmRemCoverSheet.cbEditLevelClick
   TfrmRemCoverSheet.cbxDropDownClose┘ 
TfrmRemCoverSheet.cbxDivisionChange┤   
 TfrmRemCoverSheet.cbxServiceChange┤   
TfrmRemCoverSheet.cbxLocationChange┤   
   TfrmRemCoverSheet.cbxClassChange┤   
    TfrmRemCoverSheet.cbxUserChange┤   
 TfrmRemCoverSheet.lvViewSelectItem┘   
   TfrmRemCoverSheet.lvViewChange┘     

Calls

Name Declaration Comments
TfrmRemCoverSheet.GetExternalName function GetExternalName(Level: TRemCoverDataLevel; IEN: Int64): string; -
TfrmRemCoverSheet.SetButtonHints procedure SetButtonHints; -
TfrmRemCoverSheet.UpdateMasterListView procedure UpdateMasterListView; -
TfrmRemCoverSheet.UpdateView procedure UpdateView; -

Called-By

Name Declaration Comments
TfrmRemCoverSheet.cbxDropDownClose procedure cbxDropDownClose(Sender: TObject); -


Source

782   procedure TfrmRemCoverSheet.cbEditLevelClick(Sender: TObject);
783   var
784     cb: TORCheckBox;
785     tmp: string;
786   
787   begin
788     cb := TORCheckBox(Sender);
789     if cb.Checked then
790     begin
791       FEditingLevel := TRemCoverDataLevel(cb.Tag);
792       if FEditingLevel <> dlUserClass then
793       begin
794         FCurClass := 0;
795         cbxClass.ItemIndex := -1;
796       end;
797       case FEditingLevel of
798         dlDivision:  FEditingIEN := FCurDiv;
799         dlService:   FEditingIEN := FCurSer;
800         dlLocation:  FEditingIEN := FCurLoc;
801         dlUserClass: FEditingIEN := FCurClass;
802         dlUser:      FEditingIEN := FCurUser;
803         else         FEditingIEN := 0;
804       end;
805       if FEditingIEN = 0 then
806       begin
807         tmp := ' ';
808         IF FEditingLevel = dlSystem then
809           FSelection := true
810         else
811         begin
812           sbCopyLeft.Enabled := false;
813           sbCopyRight.Enabled := false;
814           FSelection := false;
815         end;
816       end
817       else
818       begin
819         tmp := ': ';
820         FSelection := true;
821       end;
822       lblEdit.Caption := '  Editing Cover Sheet Reminders for ' + DataName[FEditingLevel] +
823                           tmp + GetExternalName(FEditingLevel, FEditingIEN);
824       lvCover.Columns[0].Caption := DataName[FEditingLevel] + ' Level Reminders';
825   
826       SetButtonHints;   {Setup hints for Lock, Add, Remove buttons based on
827                          Parameter Level}
828       UpdateView;
829       UpdateMasterListView;
830     end
831     else
832     begin
833       FSelection := false;
834       sbCopyLeft.Enabled := false;
835       sbCopyRight.Enabled := false;
836       FEditingLevel := dlPackage;
837       FEditingIEN := 0;
838       lblEdit.Caption := '';
839       lvCover.Items.BeginUpdate;
840       try
841         lvCover.Items.Clear;
842       finally
843         lvCover.Items.EndUpdate;
844       end;
845     end;
846   
847   end;