unit ULDRu;

interface
uses SysUtils, Controls, ULDRObju;

function ULDREDIT(AObj: TULDRObj):integer;export;

function ULDRBROWSE(AObj: TULDRObj):integer;export;
  { not used yet }
const
  CurULDRObj: TULDRObj = nil;

implementation
uses
  PumpFrm, UlanType, UlanGlob, ModuType, Modulu{v0.22},ULRecTyp, ULObju{/v0.22};

function ULDREDIT(AObj: TULDRObj):integer;
var
  m: TModule;
begin
  CurULDRObj := AObj;
  try
    case UserMode of

      umUser: begin
        case AObj.DeviceType of

          dtPump: begin
            if Modules.FindModuleWithPropVal(piULDR, IntToStr(longint(AObj)), m) then begin
              Result := PumpFrmEdit(m);
              exit;
            end;
          end;

        end;
      end;

    end;
    Result := AObj.Edit;
  finally
    CurULDRObj := nil;
  end;
end;


function ULDRBROWSE(AObj: TULDRObj):integer;export;
begin
  Result := mrCancel;
end;

end.
