Procedure

TfrmTIUView.cmdOKClick

Module

fTIUView

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmTIUView

Declaration

procedure cmdOKClick(Sender: TObject);

Calls Hierarchy


TfrmTIUView.cmdOKClick
 └StrToFMDateTime

Called-By Hierarchy


                        TfrmTIUView.cmdOKClick
                               SelectTIUView┘ 
                   TfrmDCSumm.mnuViewClick┤   
               TfrmDCSumm.SetViewContext┤ │   
                TfrmDCSumm.DisplayPage┤ │ │   
TfrmDCSumm.mnuViewReturntoDefaultClick┘ │ │   
    TfrmDCSumm.mnuViewSaveAsDefaultClick┘ │   
                    TfrmNotes.mnuViewClick┘   
                TfrmNotes.SetViewContext┤     
                 TfrmNotes.DisplayPage┤ │     
 TfrmNotes.mnuViewReturntoDefaultClick┘ │     
     TfrmNotes.mnuViewSaveAsDefaultClick┘     

Calls

Name Declaration Comments
StrToFMDateTime function StrToFMDateTime(const AString: string): TFMDateTime; -

Called-By

Name Declaration Comments
SelectTIUView function SelectTIUView(FontSize: Integer; ShowForm: Boolean; CurrentContext: TTIUContext; var TIUContext: TTIUContext): boolean ; -


Source

175   procedure TfrmTIUView.cmdOKClick(Sender: TObject);
176   var
177     bdate, edate: TFMDateTime;
178   begin
179     FStatus := lstStatus.ItemID;
180   
181     if calBeginDate.Text <> '' then
182        bdate := StrToFMDateTime(calBeginDate.Text)
183     else
184        bdate := 0 ;
185   
186     if calEndDate.Text <> '' then
187        edate   := StrToFMDateTime(calEndDate.Text)
188     else
189        edate := 0 ;
190   
191     if (bdate <= edate) then
192       begin
193         FBeginDate := calBeginDate.Text;
194         FFMBeginDate := bdate;
195         FEndDate := calEndDate.Text;
196         FFMEndDate := edate;
197       end
198     else
199       begin
200         InfoBox(TX_DATE_ERR, TX_DATE_ERR_CAP, MB_OK or MB_ICONWARNING);
201         Exit;
202       end;
203   
204     FAuthor := cboAuthor.ItemIEN;
205     if (FStatus = '4') and (FAuthor = 0) then
206       begin
207         InfoBox(TX_AUTH_ERR, TX_AUTH_ERR_CAP, MB_OK or MB_ICONWARNING);
208         Exit;
209       end;
210   
211     FSortBy := cboSortBy.ItemID;
212     if FSortBy = '' then FSortBy := 'R';
213     FListAscending := (radListSort.ItemIndex = 0);
214     FTreeAscending := (radTreeSort.ItemIndex = 0);
215   
216     FKeyWord := txtKeyWord.Text;
217     if (ckTitle.Checked) and (ckSubject.Checked) then
218       FSearchField := 'B'
219     else if ckTitle.Checked then
220       FSearchField := 'T'
221     else if ckSubject.Checked then
222       FSearchField := 'S'
223     else if not (ckTitle.Checked or ckSubject.Checked) then
224       begin
225         FKeyWord := '';
226         FSearchField := '';
227       end;
228     if (FKeyword <> '') then
229       FFiltered := True;
230   
231     if ckSubject.Checked then ckShowSubject.Checked := True;
232     FShowSubject := ckShowSubject.Checked;
233     FMaxDocs := StrToIntDef(edMaxDocs.Text, 0);
234     if cboGroupBy.ItemID <> '' then
235       FGroupBy := cboGroupBy.ItemID
236     else
237       FGroupBy := '';
238     FChanged := True;
239     Close;
240   end;