92 lines
2.3 KiB
ObjectPascal
92 lines
2.3 KiB
ObjectPascal
|
|
unit uDataModuleInformes;
|
||
|
|
|
||
|
|
interface
|
||
|
|
|
||
|
|
uses
|
||
|
|
SysUtils, Classes, DB, DBClient, uDAClientDataModule, uDADataTable, uDAScriptingProvider,
|
||
|
|
uROClient, uRORemoteService,
|
||
|
|
uROBinMessage, uROWinInetHttpChannel, uDADesigntimeCall, uDAMemDataTable,
|
||
|
|
uBizInformes, uIDataModuleInformes, uDataModuleBase, uDAInterfaces,
|
||
|
|
uRODynamicRequest, uDADataStreamer, uDABinAdapter, uDARemoteDataAdapter,
|
||
|
|
uDABin2DataStreamer;
|
||
|
|
|
||
|
|
type
|
||
|
|
TdmInformes = class(TDataModuleBase, IDataModuleInformes)
|
||
|
|
RORemoteService: TRORemoteService;
|
||
|
|
DADesigntimeCall1: TDADesigntimeCall;
|
||
|
|
LoginRemoteService: TRORemoteService;
|
||
|
|
ROWinInetHTTPChannel1: TROWinInetHTTPChannel;
|
||
|
|
ROBinMessage1: TROBinMessage;
|
||
|
|
tbl_Informes: TDAMemDataTable;
|
||
|
|
ds_Informes: TDADataSource;
|
||
|
|
Bin2DataStreamer: TDABin2DataStreamer;
|
||
|
|
rda_Informes: TDARemoteDataAdapter;
|
||
|
|
procedure DAClientDataModuleCreate(Sender: TObject);
|
||
|
|
|
||
|
|
public
|
||
|
|
// function GetItems (const ACategoria : String): TDAMemDataTable; overload;
|
||
|
|
function GetItems : IBizInforme; overload;
|
||
|
|
end;
|
||
|
|
|
||
|
|
var
|
||
|
|
dmInformes: TdmInformes;
|
||
|
|
|
||
|
|
implementation
|
||
|
|
|
||
|
|
{$R *.DFM}
|
||
|
|
|
||
|
|
uses
|
||
|
|
FactuGES_Intf, uDataModuleConexion, uDataTableUtils, cxControls,
|
||
|
|
schInformesClient_Intf;
|
||
|
|
|
||
|
|
|
||
|
|
procedure TdmInformes.DAClientDataModuleCreate(Sender: TObject);
|
||
|
|
begin
|
||
|
|
RORemoteService.Channel := dmConexion.Channel;
|
||
|
|
RORemoteService.Message := dmConexion.Message;
|
||
|
|
end;
|
||
|
|
|
||
|
|
{function TdmInformes.GetItems (const ACategoria : String): TDAMemDataTable;
|
||
|
|
var
|
||
|
|
dtControles: TDAMemDataTable;
|
||
|
|
AParams : TDADatasetParamArray;
|
||
|
|
begin
|
||
|
|
ShowHourglassCursor;
|
||
|
|
try
|
||
|
|
dtControles := TDAMemDataTable.Create(NIL);
|
||
|
|
CloneDataTable(tbl_Controles, dtControles);
|
||
|
|
|
||
|
|
AParams := TDADatasetParamArray.Create;
|
||
|
|
with AParams.Add do begin
|
||
|
|
Name := fld_ListaControlesPorCategoriaCATEGORIA;
|
||
|
|
Value := ACategoria;
|
||
|
|
end;
|
||
|
|
|
||
|
|
dtControles.DataRequestCall.ParamByName(par_Params).AsComplexType := AParams;
|
||
|
|
|
||
|
|
Result := dtControles;
|
||
|
|
finally
|
||
|
|
HideHourglassCursor;
|
||
|
|
end;
|
||
|
|
end;}
|
||
|
|
|
||
|
|
function TdmInformes.GetItems: IBizInforme;
|
||
|
|
var
|
||
|
|
AInformes : TDAMemDataTable;
|
||
|
|
begin
|
||
|
|
ShowHourglassCursor;
|
||
|
|
try
|
||
|
|
AInformes := CloneDataTable(tbl_Informes);
|
||
|
|
|
||
|
|
AInformes.BusinessRulesID := BIZ_CLIENT_INFORMES;
|
||
|
|
|
||
|
|
Result := (AInformes as IBizInforme);
|
||
|
|
|
||
|
|
finally
|
||
|
|
HideHourglassCursor;
|
||
|
|
end;
|
||
|
|
end;
|
||
|
|
|
||
|
|
end.
|
||
|
|
|