Procedure

TfrmOptionsTitles.cboDocumentClassClick

Module

fOptionsTitles

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmOptionsTitles

Declaration

procedure cboDocumentClassClick(Sender: TObject);

Calls Hierarchy


TfrmOptionsTitles.cboDocumentClassClick
 ├TfrmOptionsTitles.btnSaveChangesClick
 │ ├rpcSaveDocumentDefaults
 │ ├ResetNoteTitles
 │ │ └LoadNoteTitles
 │ │   └TNoteTitles.Create
 │ ├ResetDCSummTitles
 │ │ └LoadDCSummTitles
 │ │   └TDCSummTitles.Create
 │ ├IdentifyConsultsClass
 │ ├ResetConsultTitles
 │ │ └LoadConsultTitles
 │ │   ├IdentifyConsultsClass
 │ │   └TConsultTitles.Create
 │ ├IdentifyClinProcClass
 │ └ResetClinProcTitles
 │   └LoadClinProcTitles
 │     ├IdentifyClinProcClass
 │     └TClinProcTitles.Create
 ├rpcGetTitlesForUser
 ├rpcGetTitleDefault
 ├TfrmOptionsTitles.lstYourTitlesChange
 └TfrmOptionsTitles.CheckEnable
   └TfrmOptionsTitles.MemberNotOnList

Called-By Hierarchy


TfrmOptionsTitles.cboDocumentClassClick
           TfrmOptionsTitles.FormShow┘ 

Calls

Name Declaration Comments
TfrmOptionsTitles.btnSaveChangesClick procedure btnSaveChangesClick(Sender: TObject); -
TfrmOptionsTitles.CheckEnable procedure CheckEnable; -
TfrmOptionsTitles.lstYourTitlesChange procedure lstYourTitlesChange(Sender: TObject); -
rpcGetTitleDefault function rpcGetTitleDefault(value: integer): integer; -
rpcGetTitlesForUser function rpcGetTitlesForUser(value: integer): TStrings; -

Called-By

Name Declaration Comments
TfrmOptionsTitles.FormShow procedure FormShow(Sender: TObject); -


Source

124   procedure TfrmOptionsTitles.cboDocumentClassClick(Sender: TObject);
125   var
126     aList: TStringList;
127     defaultIEN: integer;
128   begin
129     if btnSaveChanges.Enabled then
130     begin
131       if InfoBox('Do you want to save changes to your '
132           + Piece(cboDocumentClass.Items[FLastClass], '^', 2) + ' defaults?',
133           'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
134         btnSaveChangesClick(self);
135     end;
136     cboDocumentTitles.Text := '';
137     cboDocumentTitles.InitLongList('');
138     aList := TStringList.Create;
139     with lstYourTitles do
140     begin
141       FastAssign(rpcGetTitlesForUser(cboDocumentClass.ItemIEN), aList);
142       SortByPiece(aList, '^', 3);
143       FastAssign(aList, lstYourTitles.Items);
144       defaultIEN := rpcGetTitleDefault(cboDocumentClass.ItemIEN);
145       if defaultIEN > 0 then SelectByIEN(defaultIEN)
146       else ItemIndex := -1;
147       if ItemIndex > -1 then
148       begin
149         lblDefault.Caption := DisplayText[ItemIndex];
150         lblDefault.Tag := ItemIEN;
151       end
152       else
153       begin
154         lblDefault.Caption := '<no default specified>';
155         lblDefault.Tag := 0;
156       end;
157     end;
158     lstYourTitlesChange(self);
159     btnSaveChanges.Enabled := false;
160     FLastClass := cboDocumentClass.ItemIndex;
161     aList.Free;
162     CheckEnable;
163   end;