unit uDataModuleTiposVenta;

interface

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

type
  TDataModuleTiposVenta = class(TDataModuleBase, IDataModuleTiposVenta)
    RORemoteService: TRORemoteService;
    Bin2DataStreamer: TDABin2DataStreamer;
    rda_TiposVenta: TDARemoteDataAdapter;
    tbl_TiposVenta: TDAMemDataTable;
    ds_TiposVenta: TDADataSource;
    procedure DAClientDataModuleCreate(Sender: TObject);
  public
    function GetItems: IBizTipoVenta;
  end;

implementation

{$R *.DFM}

uses
  FactuGES_Intf, cxControls, uDataModuleConexion, uDataTableUtils,
  schTiposVentaClient_Intf;

{ TdmAlmacens }

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

function TDataModuleTiposVenta.GetItems: IBizTipoVenta;
var
  AReferencia : TDAMemDataTable;
begin
  ShowHourglassCursor;
  try
    AReferencia := CloneDataTable(tbl_TiposVenta);
    AReferencia.BusinessRulesID := BIZ_CLIENT_TIPOSVENTA;

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


end.
