Ignore:
Timestamp:
Jul 6, 2008, 8:20:14 PM (16 years ago)
Author:
Kevin Toppenberg
Message:

Uploading from OR_30_258

File:
1 edited

Legend:

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

    r459 r460  
    3535    memMessage: TMemo;
    3636    Splitter1: TSplitter;
     37    btnAdd: TButton;
     38    Button1: TButton;
    3739    procedure FormCreate(Sender: TObject);
    3840    procedure btnCancelClick(Sender: TObject);
     
    5557    procedure lstMinuteKeyDown(Sender: TObject; var Key: Word;
    5658      Shift: TShiftState);
     59    procedure Button1Click(Sender: TObject);
    5760  private
    5861    FDaySchedule: array [1..7] of string;
     
    6669    procedure UpdateOnFreeTextInput;
    6770    function CheckDay(ADayStr: string): string;
     71   
    6872  public
    6973  end;
     
    8791   if frmOtherSchedule.ShowModal = mrOK then
    8892   begin
    89      ASchedule := frmOtherSchedule.FOtherSchedule;
     93     ASchedule := UpperCase(frmOtherSchedule.FOtherSchedule);
    9094     Result := True;
    9195   end;
     
    121125procedure TfrmOtherSchedule.btn0k1Click(Sender: TObject);
    122126begin
     127  if (cbo1.Checked = false) and (cbo2.Checked = false) and (cbo3.Checked = false) and (cbo4.Checked = false) and (cbo5.Checked = false) and
     128    (cbo6.Checked = false) and (cbo7.Checked = false) then
     129    begin
     130      ShowMessage('A day of week must be selected!');
     131      Exit;
     132    end;
    123133  if not IsValidSchStr(FOtherSchedule) then
    124134  begin
     
    176186var
    177187  i : integer;
    178   TimePart, DayPart: string;
     188  TimePart, DayPart,APRN,ASearchTxt: string;
    179189begin
    180190  TimePart := '';
    181191  DayPart := '';
     192  APRN := '';
     193  ASearchTxt := UpperCase(txtSchedule.Text);
     194  if StrPos(PChar(ASearchTxt),PChar('PRN')) <> nil then APRN := ' PRN'; //hds8326 retain PRN free text if data time entered
    182195  for i := 0 to FTimeSchedule.Count - 1 do
    183196  begin
     
    201214  end
    202215  else FOtherSchedule := TimePart;
     216  if Length(APRN) > 0 then FOtherSchedule := FOtherSchedule + APRN; //hds8326 retain PRN free text if data time entered
    203217  txtSchedule.Text := FOtherSchedule;
    204218end;
     
    368382  var
    369383    idx: integer;
     384    x: string;
    370385  begin
    371386    for idx := aDList.Count - 1 downto 0 do
    372387    begin
     388    // cq hds8326 PRN entered manually split PRN from DOW to retain last DOW
     389      x := UpperCase(aDList.Strings[idx]); // added to properly process DOW when followed by a space "PRN".
     390      if Piece(x,' ',2) = 'PRN' then
     391         aDLIst.Strings[idx] := Piece(x,' ',1);
     392    // cq hds8326
    373393      if ((CheckDay(aDList[idx]) = 'SUN') or (CheckDay(aDList[idx]) = 'SU')) then
    374394        begin
     
    419439begin
    420440  inherited;
    421   i := 0;
    422441  dayStr  := '';
    423442  timeStr := '';
     
    437456  begin
    438457    Val(Piece(txtSchedule.Text,'-',1), i, Code);
     458    if i = 0 then begin end;  // just to make compiler not give hint
    439459    if Code <> 0 then dayStr := Trim(txtSchedule.Text)
    440460    else timeStr := Trim(txtSchedule.Text);
     
    463483begin
    464484  inherited;
    465   lstMinute.ItemIndex := -1;
     485  if lstMinute.ItemIndex = -1 then lstMinute.ItemIndex :=0;
    466486end;
    467487
     
    509529  FFromCheckBox := True;
    510530  if lstHour.ItemIndex < 0 then Exit;
    511   btnAddClick(Self);
     531  //btnAddClick(Self);
    512532  FFromCheckBox := False;
    513533end;
     
    521541    FFromCheckBox := True;
    522542    if lstHour.ItemIndex < 0 then Exit;
    523     btnAddClick(Self);
     543    //btnAddClick(Self);
    524544    FFromCheckBox := False;
    525545  end;
    526546end;
    527547
     548procedure TfrmOtherSchedule.Button1Click(Sender: TObject);
     549begin
     550  inherited;
     551   cbo1.Checked := true;
     552   cbo2.Checked := true;
     553   cbo3.Checked := true;
     554   cbo4.Checked := true;
     555   cbo5.Checked := true;
     556   cbo6.Checked := true;
     557   cbo7.Checked := true;
     558end;
     559
    528560end.
    529561
Note: See TracChangeset for help on using the changeset viewer.