unit uDataModuleFicherosEDI;

interface

uses {vcl:} SysUtils, Classes, DB, DBClient, 
     {RemObjects:} uDAClientDataModule, uDADataTable, uDAScriptingProvider,
  uDACDSDataTable, uDABINAdapter, uROServiceComponent, uRORemoteService,
  uROClient, uROBinMessage, uROWinInetHttpChannel, uDataModuleBase,
  schEDILogClient_Intf, uBizEDILog;

type
  TdmFicherosEDI = class(TDAClientDataModule)
    RORemoteService: TRORemoteService;
    tbl_EDILog: TDACDSDataTable;
    ds_EDILog: TDADataSource;
    procedure DAClientDataModuleCreate(Sender: TObject);
  private
    { Private declarations }
  public
    function GetItems : IBizEDILog;
  end;

var
  dmFicherosEDI: TdmFicherosEDI;

implementation

{$R *.DFM}

uses
  uDataTableUtils, Forms, Controls, cxControls;

procedure TdmFicherosEDI.DAClientDataModuleCreate(Sender: TObject);
begin
  RORemoteService.Channel := dmBase.Channel;
  RORemoteService.Message := dmBase.Message;
end;

function TdmFicherosEDI.GetItems: IBizEDILog;
var
  dtLog: TDACDSDataTable;
begin
  ShowHourglassCursor;
  try
    dtLog := TDACDSDataTable.Create(NIL);
    CloneDataTable(tbl_EDILog, dtLog);
    dtLog.BusinessRulesID := BIZ_EDILOG;
    Result := (dtLog as IBizEDILog);
  finally
    HideHourglassCursor;
  end;
end;

initialization
  dmFicherosEDI := TdmFicherosEDI.Create(nil);

finalization
  FreeAndNil(dmFicherosEDI);

end.
