Function

TTemplate.CanModify

Module

uTemplates

Last Modified

7/15/2014 3:26:44 PM

Visibility

Public

Owner

TTemplate

Declaration

function CanModify: boolean;

Calls Hierarchy


TTemplate.CanModify
 ├TTemplate.ValidID
 └LockTemplate

Called-By Hierarchy


                               TTemplate.CanModify
                           TTemplate.RemoveChild┤ 
              TfrmTemplateEditor.sbDeleteClick┘ │ 
       TfrmTemplateEditor.mnuNodeDeleteClick┤   │ 
            TfrmTemplateEditor.tvTreeKeyDown┘   │ 
                       TTemplate.SetTemplateType┤ 
                        TTemplate.SetBoilerplate┤ 
                       TTemplate.CreateFromXML┤ │ 
                                   ..(rec)..┤ │ │ 
              TfrmTemplateEditor.btnNewClick┘ │ │ 
                             EditTemplates┤   │ │ 
     TfrmDCSumm.popSummMemoTemplateClick┤ │   │ │ 
          TfrmDCSumm.mnuNewTemplateClick┤ │   │ │ 
        TfrmDCSumm.mnuEditTemplatesClick┤ │   │ │ 
  TfrmDCSumm.mnuEditSharedTemplatesClick┤ │   │ │ 
    TfrmDCSumm.mnuNewSharedTemplateClick┤ │   │ │ 
   TfrmConsults.popNoteMemoTemplateClick┤ │   │ │ 
      TfrmConsults.mnuEditTemplatesClick┤ │   │ │ 
        TfrmConsults.mnuNewTemplateClick┤ │   │ │ 
TfrmConsults.mnuEditSharedTemplatesClick┤ │   │ │ 
  TfrmConsults.mnuNewSharedTemplateClick┤ │   │ │ 
       TfrmDrawers.mnuEditTemplatesClick┤ │   │ │ 
         TfrmDrawers.mnuNewTemplateClick┤ │   │ │ 
    TfrmSurgery.popNoteMemoTemplateClick┤ │   │ │ 
       TfrmSurgery.mnuEditTemplatesClick┤ │   │ │ 
         TfrmSurgery.mnuNewTemplateClick┤ │   │ │ 
 TfrmSurgery.mnuEditSharedTemplatesClick┤ │   │ │ 
   TfrmSurgery.mnuNewSharedTemplateClick┤ │   │ │ 
      TfrmNotes.popNoteMemoTemplateClick┤ │   │ │ 
         TfrmNotes.mnuEditTemplatesClick┤ │   │ │ 
           TfrmNotes.mnuNewTemplateClick┤ │   │ │ 
   TfrmNotes.mnuEditSharedTemplatesClick┤ │   │ │ 
     TfrmNotes.mnuNewSharedTemplateClick┘ │   │ │ 
        TfrmTemplateEditor.mnuAutoGenClick┤   │ │ 
 TfrmTemplateEditor.mnuImportTemplateClick┘   │ │ 
                           TTemplate.TrueClone┤ │ 
                             TTemplate.Clone┘ │ │ 
                  TfrmTemplateEditor.Clone┘   │ │ 
       TfrmTemplateEditor.btnNewClick...┤     │ │ 
     TfrmTemplateEditor.edtNameOldChange┤     │ │ 
   TfrmTemplateEditor.tvTreeNodeEdited┤ │     │ │ 
    TfrmTemplateEditor.mnuAutoGenClick┘ │     │ │ 
        TfrmTemplateEditor.cbActiveClick┤     │ │ 
       TfrmTemplateEditor.cbExcludeClick┤     │ │ 
         TfrmTemplateEditor.edtGapChange┤     │ │ 
        TfrmTemplateEditor.sbMoveUpClick┤     │ │ 
      TfrmTemplateEditor.sbMoveDownClick┤     │ │ 
     TfrmTemplateEditor.sbDeleteClick...┤     │ │ 
       TfrmTemplateEditor.tvTreeDragDrop┤     │ │ 
    TfrmTemplateEditor.sbCopyLeftClick┤ │     │ │ 
   TfrmTemplateEditor.sbCopyRightClick┤ │     │ │ 
  TfrmTemplateEditor.mnuNodePasteClick┘ │     │ │ 
                               ..(rec)..┤     │ │ 
         TfrmTemplateEditor.reBoilChange┤     │ │ 
        TfrmTemplateEditor.reNotesChange┤     │ │ 
              TfrmTemplateEditor.cbClick┤     │ │ 
 TfrmTemplateEditor.cbDisplayOnlyClick┤ │     │ │ 
   TfrmTemplateEditor.cbFirstLineClick┤ │     │ │ 
 TfrmTemplateEditor.cbOneItemOnlyClick┤ │     │ │ 
TfrmTemplateEditor.cbHideDlgItemsClick┤ │     │ │ 
   TfrmTemplateEditor.cbHideItemsClick┤ │     │ │ 
      TfrmTemplateEditor.cbIndentClick┤ │     │ │ 
        TfrmTemplateEditor.cbLockClick┘ │     │ │ 
        TfrmTemplateEditor.cbxTypeChange┤     │ │ 
     TfrmTemplateEditor.cbxRemDlgsChange┘     │ │ 
                              EditTemplates...┤ │ 
               TfrmTemplateEditor.reBoilChange┤ │ 
            TfrmTemplateEditor.mnuAutoGenClick┘ │ 
                      TTemplate.SetPersonalOwner┤ 
                                     ..(rec)..┤ │ 
          TfrmTemplateEditor.tvTreeDragDrop...┘ │ 
                          TTemplate.SortChildren┤ 
               TfrmTemplateEditor.mnuSortClick┘ │ 
                             TTemplate.SetActive┤ 
              TfrmTemplateEditor.cbActiveClick┘ │ 
                            TTemplate.SetExclude┤ 
                     TTemplate.SetTemplateType┤ │ 
             TfrmTemplateEditor.cbExcludeClick┘ │ 
                             TTemplate.SetDialog┤ 
              TfrmTemplateEditor.cbxTypeChange┘ │ 
                                TTemplate.SetGap┤ 
               TfrmTemplateEditor.edtGapChange┤ │ 
               TfrmTemplateEditor.reBoilChange┘ │ 
                          TTemplate.SetPrintName┤ 
        TfrmTemplateEditor.edtNameOldChange...┤ │ 
            TfrmTemplateEditor.mnuAutoGenClick┘ │ 
                           TTemplate.SetRealType┤ 
                     TTemplate.SetTemplateType┤ │ 
              TfrmTemplateEditor.cbxTypeChange┘ │ 
                        TTemplate.SetDescription┤ 
                    TTemplate.CreateFromXML...┤ │ 
                        TTemplate.TrueClone...┤ │ 
              TfrmTemplateEditor.reNotesChange┘ │ 
                        TTemplate.SetDisplayOnly┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
                          TTemplate.SetFirstLine┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
                          TTemplate.SetHideItems┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
                        TTemplate.SetIndentItems┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
                        TTemplate.SetOneItemOnly┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
                       TTemplate.SetHideDlgItems┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
              TTemplate.UpdateImportedFieldNames┤ 
                                     ..(rec)..┤ │ 
     TfrmTemplateEditor.mnuImportTemplateClick┘ │ 
                     TTemplate.SetReminderDialog┤ 
                      TTemplate.AssignFileLink┤ │ 
                                   ..(rec)..┤ │ │ 
                       TTemplate.SetFileLink┘ │ │ 
                               MarkDeleted┤   │ │ 
                               ..(rec)..┤ │   │ │ 
     TfrmTemplateEditor.sbDeleteClick...┤ │   │ │ 
             TfrmTemplateEditor.Clone...┘ │   │ │ 
                  TTemplate.SetRealType...┤   │ │ 
            TTemplate.SetReminderDialog...┤   │ │ 
            TfrmTemplateEditor.cbxLinkExit┘   │ │ 
           TfrmTemplateEditor.cbxRemDlgsChange┘ │ 
                               TTemplate.SetLock┤ 
                 TfrmTemplateEditor.cbClick...┘ │ 
                          TTemplate.SetCOMObject┤ 
            TfrmTemplateEditor.cbxCOMObjChange┘ │ 
                           TTemplate.SetCOMParam┤ 
          TfrmTemplateEditor.edtCOMParamChange┘ │ 
                     TTemplate.AssignFileLink...┤ 
               TfrmTemplateEditor.btnNewClick...┤ 
          TfrmTemplateEditor.edtNameOldChange...┤ 
                TfrmTemplateEditor.cbActiveClick┤ 
               TfrmTemplateEditor.cbExcludeClick┤ 
                 TfrmTemplateEditor.edtGapChange┤ 
                TfrmTemplateEditor.sbMoveUpClick┤ 
              TfrmTemplateEditor.sbMoveDownClick┤ 
             TfrmTemplateEditor.sbDeleteClick...┤ 
            TfrmTemplateEditor.tvTreeDragDrop...┤ 
                     TfrmTemplateEditor.Clone...┤ 
                 TfrmTemplateEditor.reBoilChange┤ 
                TfrmTemplateEditor.reNotesChange┤ 
                   TfrmTemplateEditor.cbClick...┤ 
                TfrmTemplateEditor.cbxTypeChange┤ 
             TfrmTemplateEditor.cbxRemDlgsChange┤ 
                     TfrmTemplateEditor.CanClone┤ 
             TfrmTemplateEditor.btnNewClick...┤ │ 
        TfrmTemplateEditor.edtNameOldChange...┤ │ 
              TfrmTemplateEditor.cbActiveClick┤ │ 
             TfrmTemplateEditor.cbExcludeClick┤ │ 
               TfrmTemplateEditor.edtGapChange┤ │ 
              TfrmTemplateEditor.sbMoveUpClick┤ │ 
            TfrmTemplateEditor.sbMoveDownClick┤ │ 
           TfrmTemplateEditor.sbDeleteClick...┤ │ 
          TfrmTemplateEditor.tvTreeDragDrop...┤ │ 
                   TfrmTemplateEditor.Clone...┤ │ 
               TfrmTemplateEditor.reBoilChange┤ │ 
              TfrmTemplateEditor.reNotesChange┤ │ 
                 TfrmTemplateEditor.cbClick...┤ │ 
              TfrmTemplateEditor.cbxTypeChange┤ │ 
           TfrmTemplateEditor.cbxRemDlgsChange┘ │ 
              TfrmTemplateEditor.cbxCOMObjChange┤ 
            TfrmTemplateEditor.edtCOMParamChange┤ 
                  TfrmTemplateEditor.cbxLinkExit┘ 

Calls

Name Declaration Comments
LockTemplate function LockTemplate(const ID: string): boolean; -
TTemplate.ValidID function ValidID: boolean; -

Called-By

Name Declaration Comments
TTemplate.AssignFileLink procedure AssignFileLink(const Value: string; Force: boolean); -
TfrmTemplateEditor.btnNewClick procedure btnNewClick(Sender: TObject); -
TfrmTemplateEditor.CanClone function CanClone(const Node: TTreeNode): boolean; -
TfrmTemplateEditor.cbActiveClick procedure cbActiveClick(Sender: TObject); -
TfrmTemplateEditor.cbClick procedure cbClick(Sender: TCheckBox; Index: integer); -
TfrmTemplateEditor.cbExcludeClick procedure cbExcludeClick(Sender: TObject); -
TfrmTemplateEditor.cbxCOMObjChange procedure cbxCOMObjChange(Sender: TObject); -
TfrmTemplateEditor.cbxLinkExit procedure cbxLinkExit(Sender: TObject); -
TfrmTemplateEditor.cbxRemDlgsChange procedure cbxRemDlgsChange(Sender: TObject); -
TfrmTemplateEditor.cbxTypeChange procedure cbxTypeChange(Sender: TObject); -
TfrmTemplateEditor.Clone function Clone(Node: TTreeNode): boolean; -
TfrmTemplateEditor.edtCOMParamChange procedure edtCOMParamChange(Sender: TObject); -
TfrmTemplateEditor.edtGapChange procedure edtGapChange(Sender: TObject); -
TfrmTemplateEditor.edtNameOldChange procedure edtNameOldChange(Sender: TObject); -
TfrmTemplateEditor.reBoilChange procedure reBoilChange(Sender: TObject); -
TTemplate.RemoveChild procedure RemoveChild(Child: TTemplate); -
TfrmTemplateEditor.reNotesChange procedure reNotesChange(Sender: TObject); -
TfrmTemplateEditor.sbDeleteClick procedure sbDeleteClick(Sender: TObject); -
TfrmTemplateEditor.sbMoveDownClick procedure sbMoveDownClick(Sender: TObject); -
TfrmTemplateEditor.sbMoveUpClick procedure sbMoveUpClick(Sender: TObject); -
TTemplate.SetActive procedure SetActive(const Value: boolean); -
TTemplate.SetBoilerplate procedure SetBoilerplate(Value: string); -
TTemplate.SetCOMObject procedure SetCOMObject(const Value: integer); -
TTemplate.SetCOMParam procedure SetCOMParam(const Value: string); -
TTemplate.SetDescription procedure SetDescription(const Value: string); -
TTemplate.SetDialog procedure SetDialog(const Value: boolean); -
TTemplate.SetDisplayOnly procedure SetDisplayOnly(const Value: boolean); -
TTemplate.SetExclude procedure SetExclude(const Value: boolean); -
TTemplate.SetFirstLine procedure SetFirstLine(const Value: boolean); -
TTemplate.SetGap procedure SetGap(const Value: integer); -
TTemplate.SetHideDlgItems procedure SetHideDlgItems(const Value: boolean); -
TTemplate.SetHideItems procedure SetHideItems(const Value: boolean); -
TTemplate.SetIndentItems procedure SetIndentItems(const Value: boolean); -
TTemplate.SetLock procedure SetLock(const Value: boolean); -
TTemplate.SetOneItemOnly procedure SetOneItemOnly(const Value: boolean); -
TTemplate.SetPersonalOwner procedure SetPersonalOwner(Value: Int64); -
TTemplate.SetPrintName procedure SetPrintName(const Value: string); -
TTemplate.SetRealType procedure SetRealType(const Value: TTemplateType); -
TTemplate.SetReminderDialog procedure SetReminderDialog(const Value: string); -
TTemplate.SetTemplateType procedure SetTemplateType(const Value: TTemplateType); -
TTemplate.SortChildren procedure SortChildren; -
TfrmTemplateEditor.tvTreeDragDrop procedure tvTreeDragDrop(Sender, Source: TObject; X, Y: Integer); -
TTemplate.UpdateImportedFieldNames procedure UpdateImportedFieldNames(List: TStrings); -


Source

2569  function TTemplate.CanModify: boolean;
2570  begin
2571    if(not FLocked) and ValidID and (not FCloning) then
2572    begin
2573      FLocked := LockTemplate(FID);
2574      Result := FLocked;
2575      if(not FLocked) then
2576      begin
2577        if(assigned(dmodShared.OnTemplateLock)) then
2578          dmodShared.OnTemplateLock(Self)
2579        else
2580          ShowMsg(Format(TemplateLockedText, [FPrintName]));
2581      end;
2582    end
2583    else
2584      Result := TRUE;
2585  end;