Table of Content
HAL Forum
procedure WindowDoCancel (
integer WindowId)
Description:
Pushes the cancel button on the specified record window. Has to be window with CGView type window (e.g a window with a "Cancel" button)
Parameters:
WindowId Target window, that is going to receive the cancel command
global
updating procedure CreatePRFromORDsm()
begin
  Integer wn,nwn;
  record ORVc ORr;
  record PRVc PRr;
  Integer err;
  Boolean cancelf;
  
  wn = CurWindow;
  if (WindowState(wn)==0) then begin//Rs_normal
    DeselectWindow(wn,false);
    GetWindowRecord(wn,ORr);  
    PutWindowRecord(wn,ORr);
    if (ORr.Closed==0) then begin
      err = CreatePRFromORD(ORr,PRr);
      if (err==0) then begin
        PutWindowRecord(wn,ORr);  
        if (WindowDoOK(wn,0)) then begin
          nwn = OpenWindow("PRDClass",1,0,"","",PRr);
          UpdateBrowses("PRVc");
          CloseWindow(wn);
        end else begin
          cancelf = true;
          RecordDelete(PRr);
        end;
      end else begin
        cancelf = true;
        MessageBox(err,"");
      end;
    end else begin
      cancelf = true;
    end;
  end;
  if (cancelf) then begin
    WindowDoCancel(wn);
  end;
  return;
end;
Related topics:
««