git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@5 9a1d36f3-7752-2d40-8ccb-50eb49674c68
70 lines
1.9 KiB
ObjectPascal
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.
|