Changeset 1679 for cprs/trunk/CPRS-Chart/fEncnt.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fEncnt.pas
r830 r1679 82 82 FOldHintEvent: TShowHintEvent; 83 83 OKPressed: Boolean; 84 DoNotNeedLocation: Boolean; //AGP This is used to not force a location when writing a delayed order 84 85 procedure AppShowHint(var HintStr: string; var CanShow: Boolean; 85 86 var HintInfo: THintInfo); … … 90 91 end; 91 92 92 procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0 );93 procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0; DelayedOrder: Boolean = False); 93 94 procedure UpdateVisit(FontSize: Integer); overload; 94 95 procedure UpdateVisit(FontSize: Integer; TIULocation: integer); overload; … … 124 125 end; 125 126 126 procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0 );127 procedure UpdateEncounter(PersonFilter: Int64; ADate: TFMDateTime = 0; TIULocation: integer = 0; DelayedOrder: Boolean = False); 127 128 const 128 129 UP_SHIFT = 85; … … 136 137 frmEncounter := TfrmEncounter.Create(Application); 137 138 try 139 if DelayedOrder = True then frmEncounter.DoNotNeedLocation := True 140 else frmEncounter.DoNotNeedLocation := False; 138 141 TimedOut := False; 139 142 ResizeAnchoredFormToFont(frmEncounter); … … 397 400 inherited; 398 401 msg := ''; 399 if FLocation = 0 then msg := TX_NO_LOC; 400 if FDateTime <= 0 then msg := msg + CRLF + TX_NO_DATE 401 else if(pos('.',FloatToStr(FDateTime)) = 0) then msg := msg + CRLF + TX_NO_TIME; 402 if(msg <> '') then 403 begin 404 InfoBox(msg, TC_MISSING, MB_OK); 405 Exit; 406 end 407 else 408 begin 409 ADate := FMDateTimeToDateTime(Trunc(FDateTime)); 410 AMaxDate := FMDateTimeToDateTime(FMToday) + StrToIntDef(FEncFutureLimit, 0); 411 if ADate > AMaxDate then 412 if InfoBox(TX_FUTURE_WARNING, TC_FUTURE_WARNING, MB_YESNO or MB_ICONQUESTION) = MRNO then exit; 413 end; 402 if DoNotNeedLocation = False then 403 begin 404 if FLocation = 0 then msg := TX_NO_LOC; 405 if FDateTime <= 0 then msg := msg + CRLF + TX_NO_DATE 406 else if(pos('.',FloatToStr(FDateTime)) = 0) then msg := msg + CRLF + TX_NO_TIME; 407 if(msg <> '') then 408 begin 409 InfoBox(msg, TC_MISSING, MB_OK); 410 Exit; 411 end 412 else 413 begin 414 ADate := FMDateTimeToDateTime(Trunc(FDateTime)); 415 AMaxDate := FMDateTimeToDateTime(FMToday) + StrToIntDef(FEncFutureLimit, 0); 416 if ADate > AMaxDate then 417 if InfoBox(TX_FUTURE_WARNING, TC_FUTURE_WARNING, MB_YESNO or MB_ICONQUESTION) = MRNO then exit; 418 end; 419 end; 414 420 if FFilter <> NPF_SUPPRESS then FProvider := cboPtProvider.ItemIEN; 415 421 OKPressed := True;
Note:
See TracChangeset
for help on using the changeset viewer.