82 lines
2.8 KiB
ObjectPascal
82 lines
2.8 KiB
ObjectPascal
|
|
unit srvEmpresas_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:} FactuGES_Intf, uDAScriptingProvider, uDABusinessProcessor,
|
|||
|
|
uDABin2DataStreamer, uDADataStreamer, uDAClasses, uDAInterfaces;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
{ TsrvEmpresas }
|
|||
|
|
TsrvEmpresas = class(TDataAbstractService, IsrvEmpresas)
|
|||
|
|
Diagrams: TDADiagrams;
|
|||
|
|
DABin2DataStreamer: TDABin2DataStreamer;
|
|||
|
|
schEmpresas: TDASchema;
|
|||
|
|
DataDictionary: TDADataDictionary;
|
|||
|
|
procedure DARemoteServiceCreate(Sender: TObject);
|
|||
|
|
procedure DataAbstractServiceBeforeAcquireConnection(aSender: TObject;
|
|||
|
|
var aConnectionName: string);
|
|||
|
|
procedure DataAbstractServiceBeforeGetDatasetData(aSender: TObject;
|
|||
|
|
const aDataset: IDADataset; const aIncludeSchema: Boolean;
|
|||
|
|
const aMaxRecords: Integer);
|
|||
|
|
private
|
|||
|
|
protected
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
uses
|
|||
|
|
{Generated:} FactuGES_Invk, uDataModuleServer, uRORemoteDataModule,
|
|||
|
|
uDatabaseUtils, Dialogs, Variants, uROStreamSerializer, uROBinaryHelpers,
|
|||
|
|
uSesionesUtils, schEmpresasClient_Intf, uUsersManager,
|
|||
|
|
uRestriccionesUsuarioUtils;
|
|||
|
|
|
|||
|
|
procedure Create_srvEmpresas(out anInstance : IUnknown);
|
|||
|
|
begin
|
|||
|
|
anInstance := TsrvEmpresas.Create(NIL);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
{ srvEmpresas }
|
|||
|
|
procedure TsrvEmpresas.DARemoteServiceCreate(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
SessionManager := dmServer.SessionManager;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TsrvEmpresas.DataAbstractServiceBeforeAcquireConnection(
|
|||
|
|
aSender: TObject; var aConnectionName: string);
|
|||
|
|
begin
|
|||
|
|
ConnectionName := dmServer.ConnectionName;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TsrvEmpresas.DataAbstractServiceBeforeGetDatasetData(aSender: TObject;
|
|||
|
|
const aDataset: IDADataset; const aIncludeSchema: Boolean;
|
|||
|
|
const aMaxRecords: Integer);
|
|||
|
|
begin
|
|||
|
|
Exit;
|
|||
|
|
if (aDataset.Name <> nme_EmpresasDatosBanco) then
|
|||
|
|
begin
|
|||
|
|
{ Aqu<EFBFBD> se asegura que el usuario s<EFBFBD>lo accede a las empresas a
|
|||
|
|
las que tiene permiso para acceder filtrando DataSet por ID_EMPRESA. }
|
|||
|
|
FiltrarAccesoUsuario(Session, Connection, ServiceSchema, aDataset, fld_EmpresasID);
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
initialization
|
|||
|
|
TROClassFactory.Create('srvEmpresas', Create_srvEmpresas, TsrvEmpresas_Invoker);
|
|||
|
|
|
|||
|
|
finalization
|
|||
|
|
|
|||
|
|
end.
|