Function

TfrmSurgery.LacksRequiredForCreate

Module

fSurgery

Last Modified

7/15/2014 3:26:38 PM

Comments

Determines if the fields required to create the note are present

Visibility

Private

Owner

TfrmSurgery

Declaration

function LacksRequiredForCreate: Boolean;

Calls Hierarchy


TfrmSurgery.LacksRequiredForCreate
 ├AskCosignerForDocument
 │ └TIUPatch175Installed
 │   └ServerHasPatch
 └AskCosignerForTitle
   └TIUPatch175Installed...

Called-By Hierarchy


TfrmSurgery.LacksRequiredForCreate
       TfrmSurgery.InsertNewNote┤ 
    TfrmSurgery.mnuActNewClick┘ │ 
 TfrmSurgery.cmdNewNoteClick┘   │ 
      TfrmSurgery.InsertAddendum┘ 
 TfrmSurgery.mnuActAddendClick┘   

Calls

Name Declaration Comments
AskCosignerForDocument function AskCosignerForDocument(ADocument: Integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; -
AskCosignerForTitle function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; -

Called-By

Name Declaration Comments
TfrmSurgery.InsertAddendum procedure InsertAddendum; -
TfrmSurgery.InsertNewNote procedure InsertNewNote(IsIDChild: boolean; AnIDParent: integer); -


Source

822   function TfrmSurgery.LacksRequiredForCreate: Boolean;
823   { determines if the fields required to create the note are present }
824   var
825     CurTitle: Integer;
826   begin
827     Result := False;
828     with FEditNote do
829     begin
830       if Title <= 0    then Result := True;
831       if Author <= 0   then Result := True;
832       if DateTime <= 0 then Result := True;
833       if (DocType = TYP_ADDENDUM) then
834       begin
835         if AskCosignerForDocument(Addend, Author, DateTime) and (Cosigner <= 0) then Result := True;
836       end else
837       begin
838         if Title > 0 then CurTitle := Title else CurTitle := DocType;
839         if AskCosignerForTitle(CurTitle, Author, DateTime) and (Cosigner <= 0) then Result := True;
840       end;
841     end;
842   end;