Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (10 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Orders/fOtherSchedule.pas

    r829 r1679  
    6666    procedure btnSchRemoveClick(Sender: TObject);
    6767    procedure FormDestroy(Sender: TObject);
     68    procedure NSScboScheduleExit(Sender: TObject);
     69    procedure NSScboScheduleKeyUp(Sender: TObject; var Key: Word;
     70      Shift: TShiftState);
    6871  private
    6972    FDaySchedule: array [1..7] of string;
     
    683686end;
    684687
     688procedure TfrmOtherSchedule.NSScboScheduleExit(Sender: TObject);
     689begin
     690  inherited;
     691  if Pos(CRLF, NSScboSchedule.Text)> 0 then
     692    begin
     693      NSScboSchedule.Text := '';
     694      NSScboSchedule.ItemIndex := -1;
     695      Application.MessageBox('Schedule field cannot contain a control character. Please select a valid unique schedule from the list.' +CRLF +
     696                             'Or remove the schedule text from the schedule list and select specific times from the administration times list.',
     697                              'Incorrect Schedule.');
     698      NSScboSchedule.SetFocus;
     699    end;
     700  if (NSScboSchedule.Text <> '') and (NSScboSchedule.ItemIndex = -1) then
     701    begin
     702      Application.MessageBox('Please select a valid unique schedule from the list.' +CRLF +
     703                             'Or remove the schedule text from the schedule list and select specific times from the administration times list.',
     704                              'Incorrect Schedule.');
     705      NSSCboSchedule.Text := '';
     706      NSScboSchedule.SetFocus;
     707    end;
     708
     709end;
     710
     711procedure TfrmOtherSchedule.NSScboScheduleKeyUp(Sender: TObject; var Key: Word;
     712  Shift: TShiftState);
     713begin
     714  inherited;
     715  if (Key = VK_BACK) and (NSScboSchedule.Text = '') then NSScboSchedule.itemindex:= -1;
     716end;
     717
    685718procedure TfrmOtherSchedule.lstMinuteKeyDown(Sender: TObject;
    686719  var Key: Word; Shift: TShiftState);
Note: See TracChangeset for help on using the changeset viewer.