unit srvRemesasProveedor_Impl;

{----------------------------------------------------------------------------}
{ This unit was automatically generated by the RemObjects SDK after reading  }
{ the RODL file associated with this project .                               }
{                                                                            }
{ This is where you are supposed to code the implementation of your objects. }
{----------------------------------------------------------------------------}

interface

uses
  {vcl:} Classes, SysUtils,
  {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions,
  {Ancestor Implementation:} DataAbstractService_Impl,
  {Used RODLs:} DataAbstract4_Intf,
  {Generated:}   uDABusinessProcessor, uDABin2DataStreamer, uDADataStreamer,
  uDAScriptingProvider, uDAClasses,
  FactuGES_Intf, uDAInterfaces, uDABinAdapter, uROClient;

type
  { TsrvRemesasProveedor }
  TsrvRemesasProveedor = class(TDataAbstractService, IsrvRemesasProveedor)
    Diagrams: TDADiagrams;
    bpRemesasProveedor: TDABusinessProcessor;
    Bin2DataStreamer: TDABin2DataStreamer;
    schRemesasProveedor: TDASchema;
    DataDictionary: TDADataDictionary;
    procedure DARemoteServiceCreate(Sender: TObject);
    procedure DARemoteServiceBeforeGetDatasetData(const Dataset: IDADataset;
      const IncludeSchema: Boolean; const MaxRecords: Integer);
    procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
      var aConnectionName: string);
  end;

implementation

{$R *.dfm}
uses
  {Generated:} FactuGES_Invk, uDataModuleServer,
  uDatabaseUtils, schRemesasProveedorClient_Intf, uRestriccionesUsuarioUtils,
  uBizRemesasProveedorServer, // uRptRemesasProveedor_Server,
  Dialogs;

procedure Create_srvRemesasProveedor(out anInstance : IUnknown);
begin
  anInstance := TsrvRemesasProveedor.Create(NIL);
end;

{ srvRemesasProveedor }

procedure TsrvRemesasProveedor.DARemoteServiceBeforeGetDatasetData(
  const Dataset: IDADataset; const IncludeSchema: Boolean;
  const MaxRecords: Integer);
begin
{
  if DataSet.Name = nme_RemesasProveedor then
  begin
    { Aquí se asegura que el usuario sólo accede a los RemesasProveedor
      de las empresas a las que tiene permiso para acceder
      filtrando DataSet por ID_EMPRESA. }
{    FiltrarAccesoUsuario(Session, Connection, schRemesasProveedor, DataSet, fld_RemesasProveedorID_EMPRESA);
  end;
}  
end;

procedure TsrvRemesasProveedor.DARemoteServiceCreate(Sender: TObject);
begin
  //SessionManager := dmServer.SessionManager;
  bpRemesasProveedor.BusinessRulesID := BIZ_SERVER_REMESAS_PROVEEDOR;  
end;

procedure TsrvRemesasProveedor.DataAbstractServiceBeforeAcquireConnection(
  aSender: TObject; var aConnectionName: string);
begin
  ConnectionName := dmServer.ConnectionName;
end;

initialization
  TROClassFactory.Create('srvRemesasProveedor', Create_srvRemesasProveedor, TsrvRemesasProveedor_Invoker);

finalization

end.
