Function

TfrmRemCoverSheet.GetCurrent

Module

fRemCoverSheet

Last Modified

7/15/2014 3:26:38 PM

Visibility

Private

Owner

TfrmRemCoverSheet

Declaration

function GetCurrent(IEN: Int64; Level: TRemCoverDataLevel; Show: boolean;
                    Add: boolean = FALSE): TORStringList;

Calls Hierarchy


TfrmRemCoverSheet.GetCurrent
 └TfrmRemCoverSheet.GetCoverSheetLvlData
   └GetCoverSheetLevelData

Called-By Hierarchy


                         TfrmRemCoverSheet.GetCurrent
                       TfrmRemCoverSheet.UpdateView┤ 
                           TfrmRemCoverSheet.Init┤ │ 
                     EditCoverSheetReminderList┘ │ │ 
          TfrmReminderTree.mnuCoverSheetClick┤   │ │ 
                       DialogOptionsReminders┘   │ │ 
         TfrmOptions.btnCoverRemindersClick┘     │ │ 
               TfrmRemCoverSheet.cbxDropDownClose┤ │ 
            TfrmRemCoverSheet.cbxDivisionChange┤ │ │ 
             TfrmRemCoverSheet.cbxServiceChange┤ │ │ 
            TfrmRemCoverSheet.cbxLocationChange┤ │ │ 
               TfrmRemCoverSheet.cbxClassChange┤ │ │ 
                TfrmRemCoverSheet.cbxUserChange┤ │ │ 
             TfrmRemCoverSheet.lvViewSelectItem┘ │ │ 
               TfrmRemCoverSheet.lvViewChange┘   │ │ 
               TfrmRemCoverSheet.cbEditLevelClick┤ │ 
          TfrmRemCoverSheet.cbxDropDownClose...┘ │ │ 
              TfrmRemCoverSheet.MarkListAsChanged┘ │ 
                 TfrmRemCoverSheet.ChangeStatus┤   │ 
                TfrmRemCoverSheet.btnAddClick┤ │   │ 
         TfrmRemCoverSheet.LockButtonUpdate┘ │ │   │ 
          TfrmRemCoverSheet.UpdateButtons┤   │ │   │ 
              TfrmRemCoverSheet.Init...┤ │   │ │   │ 
 TfrmRemCoverSheet.UpdateMasterListView┤ │   │ │   │ 
TfrmRemCoverSheet.cbEditLevelClick...┤ │ │   │ │   │ 
   TfrmRemCoverSheet.sbCopyRightClick┤ │ │   │ │   │ 
    TfrmRemCoverSheet.sbCopyLeftClick┤ │ │   │ │   │ 
           TfrmRemCoverSheet.SaveData┘ │ │   │ │   │ 
    TfrmRemCoverSheet.btnApplyClick┤   │ │   │ │   │ 
       TfrmRemCoverSheet.btnOKClick┘   │ │   │ │   │ 
         TfrmRemCoverSheet.edtSeqChange┤ │   │ │   │ 
          TfrmRemCoverSheet.tvAllChange┤ │   │ │   │ 
        TfrmRemCoverSheet.lvCoverChange┤ │   │ │   │ 
            TfrmRemCoverSheet.sbUpClick┤ │   │ │   │ 
          TfrmRemCoverSheet.sbDownClick┤ │   │ │   │ 
 TfrmRemCoverSheet.ActiveControlChanged┘ │   │ │   │ 
       TfrmRemCoverSheet.btnViewClick┤   │   │ │   │ 
         TfrmRemCoverSheet.FormCreate┘   │   │ │   │ 
        TfrmRemCoverSheet.ChangeStatus...┘   │ │   │ 
             TfrmRemCoverSheet.btnRemoveClick┤ │   │ 
               TfrmRemCoverSheet.btnLockClick┘ │   │ 
      TfrmRemCoverSheet.LockButtonUpdate...┘   │   │ 
                       TfrmRemCoverSheet.SetSeq┤   │ 
               TfrmRemCoverSheet.edtSeqChange┤ │   │ 
                  TfrmRemCoverSheet.sbUpClick┤ │   │ 
                TfrmRemCoverSheet.sbDownClick┘ │   │ 
             TfrmRemCoverSheet.sbCopyRightClick┤   │ 
              TfrmRemCoverSheet.sbCopyLeftClick┘   │ 
          TfrmRemCoverSheet.UpdateMasterListView...┤ 
                 TfrmRemCoverSheet.UpdateButtons...┤ 
                  TfrmRemCoverSheet.ChangeStatus...┤ 
                        TfrmRemCoverSheet.SetSeq...┤ 
                 TfrmRemCoverSheet.sbCopyRightClick┤ 
                  TfrmRemCoverSheet.sbCopyLeftClick┘ 

Calls

Name Declaration Comments
TfrmRemCoverSheet.GetCoverSheetLvlData function GetCoverSheetLvlData(ALevel, AClass: string): TStrings; -

Called-By

Name Declaration Comments
TfrmRemCoverSheet.ChangeStatus procedure ChangeStatus(Code: string); -
TfrmRemCoverSheet.sbCopyLeftClick procedure sbCopyLeftClick(Sender: TObject); -
TfrmRemCoverSheet.sbCopyRightClick procedure sbCopyRightClick(Sender: TObject); -
TfrmRemCoverSheet.SetSeq procedure SetSeq(Item: TListItem; const Value: string); -
TfrmRemCoverSheet.UpdateButtons procedure UpdateButtons; -
TfrmRemCoverSheet.UpdateMasterListView procedure UpdateMasterListView; -
TfrmRemCoverSheet.UpdateView procedure UpdateView; -


Source

473   function TfrmRemCoverSheet.GetCurrent(IEN: Int64; Level: TRemCoverDataLevel;
474                              Show: boolean; Add: boolean = FALSE): TORStringList;
475   var
476     lvl, cls, sIEN: string;
477     tmpSL: TORStringList;
478     i, idx: integer;
479   
480   begin
481     idx := FData.IndexOfPiece(DataCode[Level] + IntToStr(IEN));
482     if idx < 0 then
483     begin
484       if (IEN = 0) and (not (Level in [dlPackage, dlSystem])) then
485       begin
486         Result := nil;
487         exit;
488       end;
489       cls := '';
490       sIEN := IntToStr(IEN);
491       lvl := InternalName[Level];
492       case Level of
493         dlDivision, dlService, dlLocation, dlUser:
494           lvl := lvl + '.`' + sIEN;
495         dlUserClass:
496           cls := sIEN;
497       end;
498       if (lvl <> '') then
499       begin
500         tmpSL := TORStringList.Create;
501         try
502           //tmpSL.Assign(GetCoverSheetLvlData(lvl, cls));
503           FastAssign(GetCoverSheetLvlData(lvl, cls),  tmpSL);
504           if (not Add) and (tmpSL.Count = 0) then
505             FreeAndNil(tmpSL);
506           idx := FData.AddObject(DataCode[Level] + IntToStr(IEN), tmpSL);
507         except
508           tmpSL.Free;
509           raise;
510         end;
511       end;
512     end;
513     if idx >= 0 then
514     begin
515       tmpSL := TORStringList(FData.Objects[idx]);
516       if Add and (not assigned(tmpSL)) then
517       begin
518         tmpSL := TORStringList.Create;
519         FData.Objects[idx] := tmpSL;
520       end;
521     end
522     else
523       tmpSL := nil;
524     if Show and assigned(tmpSL) then
525     begin
526       for i := 0 to tmpSL.Count-1 do
527         SetupItem(lvView.Items.Add, tmpSL[i], Level, IEN);
528     end;
529     Result := tmpSL;
530   end;