unit ULDRu;
{$I DEFINE.PAS}
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,
  {$IFDEF USEDLL}
  ModuProc
  {$ELSE}
  Modulu
  {$ENDIF}

  {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
            {$IFDEF USEDLL}
            if ModulesHasModule(Modules, mpULDR, IntToStr(longint(AObj)), m) then
            {$ELSE}
            if Modules.FindModuleWithPropVal(piULDR, IntToStr(longint(AObj)), m) then
            {$ENDIF}
            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.
