git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@5 9a1d36f3-7752-2d40-8ccb-50eb49674c68
69 lines
1.9 KiB
ObjectPascal
69 lines
1.9 KiB
ObjectPascal
unit srvCuentas_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:} DARemoteService_Impl,
|
|
{Used RODLs:} DataAbstract_Intf,
|
|
{Generated:} FactuGES_Intf, uDAClasses, uDADataTable, uDABINAdapter;
|
|
|
|
type
|
|
{ TsrvCuentas }
|
|
TsrvCuentas = class(TDARemoteService, IsrvCuentas)
|
|
schCuentas: TDASchema;
|
|
DABINAdapter: TDABINAdapter;
|
|
private
|
|
protected
|
|
{ IsrvCuentas methods }
|
|
function GenerateReport: Binary;
|
|
function PuedoEliminarCuenta(const Codigo: Integer): Boolean;
|
|
end;
|
|
|
|
implementation
|
|
|
|
{$R *.dfm}
|
|
uses
|
|
{Generated:} FactuGES_Invk, uDataModuleServer, uDAInterfaces;
|
|
|
|
procedure Create_srvCuentas(out anInstance : IUnknown);
|
|
begin
|
|
anInstance := TsrvCuentas.Create(NIL);
|
|
end;
|
|
|
|
{ srvCuentas }
|
|
function TsrvCuentas.GenerateReport: Binary;
|
|
begin
|
|
//
|
|
end;
|
|
|
|
function TsrvCuentas.PuedoEliminarCuenta(const Codigo: Integer): Boolean;
|
|
var
|
|
dsData: IDASQLCommand;
|
|
begin
|
|
Result := True;
|
|
Connection.BeginTransaction;
|
|
try
|
|
dsData := schCuentas.NewCommand(Connection, 'Delete_Cuentas', ['OLD_CODIGO'], [Codigo]);
|
|
except
|
|
on E: Exception do
|
|
Result := False;
|
|
end;
|
|
Connection.RollbackTransaction;
|
|
end;
|
|
|
|
initialization
|
|
TROClassFactory.Create('srvCuentas', Create_srvCuentas, TsrvCuentas_Invoker);
|
|
|
|
finalization
|
|
|
|
end.
|