unit uDataModuleReferencias;

interface

uses
  SysUtils, Classes, DB, uDADataTable, uDABINAdapter,
  uDAScriptingProvider, uDACDSDataTable, uROWinInetHttpChannel, uROTypes,
  uRORemoteService, uROClient, uROBinMessage,
  uDADesigntimeCall, uIDataModuleReferencias, uBizReferencias, uDataModuleBase,
  uDARemoteDataAdapter, uDADataStreamer, uDABin2DataStreamer, uDAInterfaces,
  uDAMemDataTable, uDADataAdapter;

type
  TDataModuleReferencias = class(TDataModuleBase, IDataModuleReferencias)
    RORemoteService: TRORemoteService;
    Bin2DataStreamer: TDABin2DataStreamer;
    rda_Referencias: TDARemoteDataAdapter;
    tbl_Referencias: TDAMemDataTable;
    ds_Referencias: TDADataSource;
    procedure DAClientDataModuleCreate(Sender: TObject);
  public
    function GetItems: IBizReferencia;
  end;

implementation

{$R *.DFM}

uses
  FactuGES_Intf, cxControls, uDataModuleConexion, uDataTableUtils,
  schReferenciasClient_Intf;

{ TdmAlmacens }

procedure TDataModuleReferencias.DAClientDataModuleCreate(Sender: TObject);
begin
  RORemoteService.Channel := dmConexion.Channel;
  RORemoteService.Message := dmConexion.Message;
end;

function TDataModuleReferencias.GetItems: IBizReferencia;
var
  AReferencia : TDAMemDataTable;
begin
  ShowHourglassCursor;
  try
    AReferencia := CloneDataTable(tbl_Referencias);
    AReferencia.BusinessRulesID := BIZ_CLIENT_REFERENCIA;

    Result := (AReferencia as IBizReferencia);
  finally
    HideHourglassCursor;
  end;
end;


end.
