This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Almacenes/Servidor/srvAlmacenes_Impl.pas
2007-06-21 16:02:50 +00:00

70 lines
1.9 KiB
ObjectPascal

unit srvAlmacenes_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
{ TsrvAlmacenes }
TsrvAlmacenes = class(TDARemoteService, IsrvAlmacenes)
schAlmacenes: TDASchema;
DABINAdapter: TDABINAdapter;
private
protected
{ IsrvAlmacenes methods }
function GenerateReport: Binary;
function PuedoEliminarAlmacen(const Codigo: Integer): Boolean;
end;
implementation
{$R *.dfm}
uses
{Generated:} FactuGES_Invk, uDataModuleServer, uDAInterfaces;
procedure Create_srvAlmacenes(out anInstance : IUnknown);
begin
anInstance := TsrvAlmacenes.Create(NIL);
end;
{ srvAlmacenes }
function TsrvAlmacenes.GenerateReport: Binary;
begin
//
end;
function TsrvAlmacenes.PuedoEliminarAlmacen(
const Codigo: Integer): Boolean;
var
dsData: IDASQLCommand;
begin
Result := True;
Connection.BeginTransaction;
try
dsData := schAlmacenes.NewCommand(Connection, 'Delete_Almacenes', ['OLD_CODIGO'], [Codigo]);
except
on E: Exception do
Result := False;
end;
Connection.RollbackTransaction;
end;
initialization
TROClassFactory.Create('srvAlmacenes', Create_srvAlmacenes, TsrvAlmacenes_Invoker);
finalization
end.