77 lines
2.0 KiB
ObjectPascal
77 lines
2.0 KiB
ObjectPascal
|
|
unit uDataModuleControles;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses {vcl:} SysUtils, Classes, DB, DBClient,
|
|||
|
|
{RemObjects:} uDAClientDataModule, uDADataTable, uDAScriptingProvider,
|
|||
|
|
uDACDSDataTable, uROClient, uROServiceComponent, uRORemoteService,
|
|||
|
|
uDARemoteDataAdapter, uDAInterfaces, uDADataStreamer, uDABinAdapter,
|
|||
|
|
uDAMemDataTable;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
TdmControles = class(TDAClientDataModule)
|
|||
|
|
RemoteService: TRORemoteService;
|
|||
|
|
ds_Controles: TDADataSource;
|
|||
|
|
DARemoteDataAdapter: TDARemoteDataAdapter;
|
|||
|
|
DABinDataStreamer1: TDABinDataStreamer;
|
|||
|
|
tbl_Controles: TDACDSDataTable;
|
|||
|
|
procedure DAClientDataModuleCreate(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
{ Private declarations }
|
|||
|
|
public
|
|||
|
|
function GetItems (const ACategoria : String): TDACDSDataTable;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
dmControles: TdmControles;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
{$R *.DFM}
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Forms, Controls,
|
|||
|
|
schControlesClient_Intf,
|
|||
|
|
uDataModuleBase, uDataTableUtils, DataAbstract3_Intf, cxControls;
|
|||
|
|
|
|||
|
|
procedure TdmControles.DAClientDataModuleCreate(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
RemoteService.Channel := dmBase.Channel;
|
|||
|
|
RemoteService.Message := dmBase.Message;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TdmControles.GetItems (const ACategoria : String): TDACDSDataTable;
|
|||
|
|
var
|
|||
|
|
dtControles: TDACDSDataTable;
|
|||
|
|
//AParams : TDADatasetParamArray;
|
|||
|
|
begin
|
|||
|
|
ShowHourglassCursor;
|
|||
|
|
try
|
|||
|
|
dtControles := TDACDSDataTable.Create(NIL);
|
|||
|
|
CloneDataTable(tbl_Controles, dtControles);
|
|||
|
|
|
|||
|
|
// Begin adaptaci<63>n DA5
|
|||
|
|
{AParams := TDADatasetParamArray.Create;
|
|||
|
|
with AParams.Add do begin
|
|||
|
|
Name := fld_ListaControlesPorCategoriaCATEGORIA;
|
|||
|
|
Value := ACategoria;
|
|||
|
|
end;}
|
|||
|
|
//dtControles.DataRequestCall.ParamByName(par_Params).AsComplexType := AParams;
|
|||
|
|
|
|||
|
|
dtControles.ParamByName(fld_ListaControlesPorCategoriaCATEGORIA).AsString := ACategoria; // adaptaci<63>n
|
|||
|
|
// End adaptaci<63>n DA5
|
|||
|
|
Result := dtControles;
|
|||
|
|
finally
|
|||
|
|
HideHourglassCursor;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
initialization
|
|||
|
|
dmControles := TdmControles.Create(nil);
|
|||
|
|
|
|||
|
|
finalization
|
|||
|
|
FreeAndNil(dmControles);
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|