759 lines
23 KiB
ObjectPascal
759 lines
23 KiB
ObjectPascal
unit FactuGES_Intf;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ This unit was automatically generated by the RemObjects SDK after reading }
|
|
{ the RODL file associated with this project . }
|
|
{ }
|
|
{ Do not modify this unit manually, or your changes will be lost when this }
|
|
{ unit is regenerated the next time you compile the project. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
{$I Remobjects.inc}
|
|
|
|
interface
|
|
|
|
uses
|
|
{vcl:} Classes, TypInfo,
|
|
{RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf,
|
|
{Used RODLs:} DataAbstract4_Intf;
|
|
|
|
const
|
|
{ Library ID }
|
|
LibraryUID = '{99553DD5-13B5-40EB-B7E6-D2B9A7C1B4D6}';
|
|
TargetNamespace = '';
|
|
|
|
{ Service Interface ID's }
|
|
IsrvContactos_IID : TGUID = '{28CCDC07-A3A4-4917-89B4-64423DC70C9D}';
|
|
IsrvLogin_IID : TGUID = '{399F9DB4-1B34-4140-AB6E-3BC10C0A7034}';
|
|
IsrvEmpresas_IID : TGUID = '{590F06D1-26B4-435B-B636-50CB8FFE6353}';
|
|
IsrvConfiguracion_IID : TGUID = '{0882B8A4-C8AA-424E-8FC1-C6226B670522}';
|
|
IsrvFamilias_IID : TGUID = '{D351175C-CBFD-4328-BF2A-FDC0B05A6308}';
|
|
IsrvFormasPago_IID : TGUID = '{38AA9F85-B454-4A87-B6E8-E9C8BB2A17D9}';
|
|
IsrvTiposIVA_IID : TGUID = '{09B44AB5-6212-448A-8DF2-A503E3F2C9B1}';
|
|
IsrvUsuarios_IID : TGUID = '{29388459-1A0B-46BE-AF9E-66A9E7AABB0B}';
|
|
|
|
{ Event ID's }
|
|
|
|
type
|
|
{ Forward declarations }
|
|
IsrvContactos = interface;
|
|
IsrvLogin = interface;
|
|
IsrvEmpresas = interface;
|
|
IsrvConfiguracion = interface;
|
|
IsrvFamilias = interface;
|
|
IsrvFormasPago = interface;
|
|
IsrvTiposIVA = interface;
|
|
IsrvUsuarios = interface;
|
|
|
|
TRdxEmpresasArray = class;
|
|
|
|
TRdxLoginInfo = class;
|
|
|
|
|
|
|
|
{ Enumerateds }
|
|
|
|
{ TRdxLoginInfo }
|
|
TRdxLoginInfo = class(TROComplexType)
|
|
private
|
|
fUserID: Integer;
|
|
fSessionID: String;
|
|
fUsuario: String;
|
|
fPerfiles: StringArray;
|
|
fEmpresas: TRdxEmpresasArray;
|
|
function GetPerfiles: StringArray;
|
|
function GetEmpresas: TRdxEmpresasArray;
|
|
public
|
|
procedure Assign(iSource: TPersistent); override;
|
|
procedure ReadComplex(ASerializer: TObject); override;
|
|
procedure WriteComplex(ASerializer: TObject); override;
|
|
published
|
|
property UserID:Integer read fUserID write fUserID;
|
|
property SessionID:String read fSessionID write fSessionID;
|
|
property Usuario:String read fUsuario write fUsuario;
|
|
property Perfiles:StringArray read GetPerfiles write fPerfiles;
|
|
property Empresas:TRdxEmpresasArray read GetEmpresas write fEmpresas;
|
|
end;
|
|
|
|
{ TRdxLoginInfoCollection }
|
|
TRdxLoginInfoCollection = class(TROCollection)
|
|
protected
|
|
constructor Create(aItemClass: TCollectionItemClass); overload;
|
|
function GetItems(aIndex: integer): TRdxLoginInfo;
|
|
procedure SetItems(aIndex: integer; const Value: TRdxLoginInfo);
|
|
public
|
|
constructor Create; overload;
|
|
function Add: TRdxLoginInfo; reintroduce;
|
|
property Items[Index: integer]:TRdxLoginInfo read GetItems write SetItems; default;
|
|
end;
|
|
|
|
{ TRdxEmpresasArray }
|
|
TRdxEmpresasArray_Integer = array of Integer;
|
|
TRdxEmpresasArray = class(TROArray)
|
|
private
|
|
fCount: Integer;
|
|
fItems : TRdxEmpresasArray_Integer;
|
|
protected
|
|
procedure Grow; virtual;
|
|
function GetItems(aIndex: integer): Integer;
|
|
procedure SetItems(aIndex: integer; const Value: Integer);
|
|
function GetCount: integer; override;
|
|
public
|
|
class function GetItemType: PTypeInfo; override;
|
|
class function GetItemSize: integer; override;
|
|
function GetItemRef(aIndex: integer): pointer; override;
|
|
procedure Clear; override;
|
|
procedure Delete(aIndex: integer); override;
|
|
procedure Resize(ElementCount: integer); override;
|
|
|
|
procedure Assign(iSource:TPersistent); override;
|
|
procedure ReadComplex(ASerializer: TObject); override;
|
|
procedure WriteComplex(ASerializer: TObject); override;
|
|
function Add(const Value:Integer): integer;
|
|
|
|
property Count : integer read GetCount;
|
|
property Items[Index: integer]:Integer read GetItems write SetItems; default;
|
|
property InnerArray: TRdxEmpresasArray_Integer read fItems;
|
|
end;
|
|
|
|
{ IsrvContactos }
|
|
IsrvContactos = interface(IDataAbstractService)
|
|
['{28CCDC07-A3A4-4917-89B4-64423DC70C9D}']
|
|
function GenerateFichaEmpleadoReport(const EmpleadoID: String): Binary;
|
|
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
|
end;
|
|
|
|
{ CosrvContactos }
|
|
CosrvContactos = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvContactos;
|
|
end;
|
|
|
|
{ TsrvContactos_Proxy }
|
|
TsrvContactos_Proxy = class(TDataAbstractService_Proxy, IsrvContactos)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
function GenerateFichaEmpleadoReport(const EmpleadoID: String): Binary;
|
|
function GenerateEtiquetasReport(const ContactosID: String): Binary;
|
|
end;
|
|
|
|
{ IsrvLogin }
|
|
IsrvLogin = interface(IDataAbstractService)
|
|
['{399F9DB4-1B34-4140-AB6E-3BC10C0A7034}']
|
|
function Login(const User: String; const Password: String; out LoginInfo: TRdxLoginInfo): Boolean;
|
|
procedure Logout;
|
|
function Ping: Boolean;
|
|
end;
|
|
|
|
{ CosrvLogin }
|
|
CosrvLogin = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
|
|
end;
|
|
|
|
{ TsrvLogin_Proxy }
|
|
TsrvLogin_Proxy = class(TDataAbstractService_Proxy, IsrvLogin)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
function Login(const User: String; const Password: String; out LoginInfo: TRdxLoginInfo): Boolean;
|
|
procedure Logout;
|
|
function Ping: Boolean;
|
|
end;
|
|
|
|
{ IsrvEmpresas }
|
|
IsrvEmpresas = interface(IDataAbstractService)
|
|
['{590F06D1-26B4-435B-B636-50CB8FFE6353}']
|
|
end;
|
|
|
|
{ CosrvEmpresas }
|
|
CosrvEmpresas = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvEmpresas;
|
|
end;
|
|
|
|
{ TsrvEmpresas_Proxy }
|
|
TsrvEmpresas_Proxy = class(TDataAbstractService_Proxy, IsrvEmpresas)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
end;
|
|
|
|
{ IsrvConfiguracion }
|
|
IsrvConfiguracion = interface(IDataAbstractService)
|
|
['{0882B8A4-C8AA-424E-8FC1-C6226B670522}']
|
|
function darValor(const CODIGO: String): String;
|
|
end;
|
|
|
|
{ CosrvConfiguracion }
|
|
CosrvConfiguracion = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
|
end;
|
|
|
|
{ TsrvConfiguracion_Proxy }
|
|
TsrvConfiguracion_Proxy = class(TDataAbstractService_Proxy, IsrvConfiguracion)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
function darValor(const CODIGO: String): String;
|
|
end;
|
|
|
|
{ IsrvFamilias }
|
|
IsrvFamilias = interface(IDataAbstractService)
|
|
['{D351175C-CBFD-4328-BF2A-FDC0B05A6308}']
|
|
end;
|
|
|
|
{ CosrvFamilias }
|
|
CosrvFamilias = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFamilias;
|
|
end;
|
|
|
|
{ TsrvFamilias_Proxy }
|
|
TsrvFamilias_Proxy = class(TDataAbstractService_Proxy, IsrvFamilias)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
end;
|
|
|
|
{ IsrvFormasPago }
|
|
IsrvFormasPago = interface(IDataAbstractService)
|
|
['{38AA9F85-B454-4A87-B6E8-E9C8BB2A17D9}']
|
|
end;
|
|
|
|
{ CosrvFormasPago }
|
|
CosrvFormasPago = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFormasPago;
|
|
end;
|
|
|
|
{ TsrvFormasPago_Proxy }
|
|
TsrvFormasPago_Proxy = class(TDataAbstractService_Proxy, IsrvFormasPago)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
end;
|
|
|
|
{ IsrvTiposIVA }
|
|
IsrvTiposIVA = interface(IDataAbstractService)
|
|
['{09B44AB5-6212-448A-8DF2-A503E3F2C9B1}']
|
|
end;
|
|
|
|
{ CosrvTiposIVA }
|
|
CosrvTiposIVA = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTiposIVA;
|
|
end;
|
|
|
|
{ TsrvTiposIVA_Proxy }
|
|
TsrvTiposIVA_Proxy = class(TDataAbstractService_Proxy, IsrvTiposIVA)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
end;
|
|
|
|
{ IsrvUsuarios }
|
|
IsrvUsuarios = interface(IDataAbstractService)
|
|
['{29388459-1A0B-46BE-AF9E-66A9E7AABB0B}']
|
|
end;
|
|
|
|
{ CosrvUsuarios }
|
|
CosrvUsuarios = class
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvUsuarios;
|
|
end;
|
|
|
|
{ TsrvUsuarios_Proxy }
|
|
TsrvUsuarios_Proxy = class(TDataAbstractService_Proxy, IsrvUsuarios)
|
|
protected
|
|
function __GetInterfaceName:string; override;
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
{vcl:} SysUtils,
|
|
{RemObjects:} uROEventRepository, uROSerializer, uRORes;
|
|
|
|
{ TRdxEmpresasArray }
|
|
|
|
procedure TRdxEmpresasArray.Assign(iSource: TPersistent);
|
|
var lSource:TRdxEmpresasArray;
|
|
i:integer;
|
|
begin
|
|
if (iSource is TRdxEmpresasArray) then begin
|
|
lSource := TRdxEmpresasArray(iSource);
|
|
Clear();
|
|
Resize(lSource.Count);
|
|
|
|
for i := 0 to Count-1 do begin
|
|
Items[i] := lSource.Items[i];
|
|
end;
|
|
end
|
|
else begin
|
|
inherited Assign(iSource);
|
|
end;
|
|
end;
|
|
|
|
class function TRdxEmpresasArray.GetItemType: PTypeInfo;
|
|
begin
|
|
result := TypeInfo(Integer);
|
|
end;
|
|
|
|
class function TRdxEmpresasArray.GetItemSize: integer;
|
|
begin
|
|
result := SizeOf(Integer);
|
|
end;
|
|
|
|
function TRdxEmpresasArray.GetItems(aIndex: integer): Integer;
|
|
begin
|
|
if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
|
|
result := fItems[aIndex];
|
|
end;
|
|
|
|
function TRdxEmpresasArray.GetItemRef(aIndex: integer): pointer;
|
|
begin
|
|
if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
|
|
result := @fItems[aIndex];
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.Clear;
|
|
begin
|
|
SetLength(fItems, 0);
|
|
FCount := 0;
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.Delete(aIndex: integer);
|
|
var i: integer;
|
|
begin
|
|
if (aIndex>=Count) then RaiseError(err_InvalidIndex, [aIndex]);
|
|
|
|
if (aIndex<Count-1) then
|
|
for i := aIndex to Count-2 do fItems[i] := fItems[i+1];
|
|
|
|
SetLength(fItems, Count-1);
|
|
Dec(FCount);
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.SetItems(aIndex: integer; const Value: Integer);
|
|
begin
|
|
if (aIndex < 0) or (aIndex >= Count) then RaiseError(err_ArrayIndexOutOfBounds,[aIndex]);
|
|
if fItems[aIndex] <> Value then begin
|
|
fItems[aIndex] := Value;
|
|
end;
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.Resize(ElementCount: integer);
|
|
begin
|
|
if fCount = ElementCount then Exit;
|
|
SetLength(fItems, ElementCount);
|
|
FCount := ElementCount;
|
|
end;
|
|
|
|
function TRdxEmpresasArray.GetCount: integer;
|
|
begin
|
|
result := FCount;
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.Grow;
|
|
var
|
|
Delta, Capacity: Integer;
|
|
begin
|
|
Capacity := Length(fItems);
|
|
if Capacity > 64 then
|
|
Delta := Capacity div 4
|
|
else
|
|
if Capacity > 8 then
|
|
Delta := 16
|
|
else
|
|
Delta := 4;
|
|
SetLength(fItems, Capacity + Delta);
|
|
end;
|
|
|
|
function TRdxEmpresasArray.Add(const Value: Integer): integer;
|
|
begin
|
|
Result := Count;
|
|
if Length(fItems) = Result then
|
|
Grow;
|
|
fItems[result] := Value;
|
|
Inc(fCount);
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.ReadComplex(ASerializer: TObject);
|
|
var
|
|
lval: Integer;
|
|
i: integer;
|
|
begin
|
|
for i := 0 to Count-1 do begin
|
|
with TROSerializer(ASerializer) do
|
|
ReadInteger(GetArrayElementName(GetItemType, GetItemRef(i)), otSLong, lval, i);
|
|
Items[i] := lval;
|
|
end;
|
|
end;
|
|
|
|
procedure TRdxEmpresasArray.WriteComplex(ASerializer: TObject);
|
|
var
|
|
i: integer;
|
|
begin
|
|
for i := 0 to Count-1 do
|
|
with TROSerializer(ASerializer) do
|
|
WriteInteger(GetArrayElementName(GetItemType, GetItemRef(i)), otSLong, fItems[i], i);
|
|
end;
|
|
|
|
{ TRdxLoginInfo }
|
|
|
|
procedure TRdxLoginInfo.Assign(iSource: TPersistent);
|
|
var lSource: FactuGES_Intf.TRdxLoginInfo;
|
|
begin
|
|
inherited Assign(iSource);
|
|
if (iSource is FactuGES_Intf.TRdxLoginInfo) then begin
|
|
lSource := FactuGES_Intf.TRdxLoginInfo(iSource);
|
|
UserID := lSource.UserID;
|
|
SessionID := lSource.SessionID;
|
|
Usuario := lSource.Usuario;
|
|
Perfiles.Assign(lSource.Perfiles);
|
|
Empresas.Assign(lSource.Empresas);
|
|
end;
|
|
end;
|
|
|
|
function TRdxLoginInfo.GetPerfiles: StringArray;
|
|
begin
|
|
if (fPerfiles = nil) then fPerfiles := StringArray.Create();
|
|
result := fPerfiles;
|
|
end;
|
|
|
|
function TRdxLoginInfo.GetEmpresas: TRdxEmpresasArray;
|
|
begin
|
|
if (fEmpresas = nil) then fEmpresas := TRdxEmpresasArray.Create();
|
|
result := fEmpresas;
|
|
end;
|
|
|
|
procedure TRdxLoginInfo.ReadComplex(ASerializer: TObject);
|
|
var
|
|
l_Empresas: TRdxEmpresasArray;
|
|
l_Perfiles: StringArray;
|
|
l_SessionID: String;
|
|
l_UserID: Integer;
|
|
l_Usuario: String;
|
|
begin
|
|
if TROSerializer(ASerializer).RecordStrictOrder then begin
|
|
l_UserID := UserID;
|
|
TROSerializer(ASerializer).ReadInteger('UserID', otSLong, l_UserID);
|
|
UserID := l_UserID;
|
|
l_SessionID := SessionID;
|
|
TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
|
|
SessionID := l_SessionID;
|
|
l_Usuario := Usuario;
|
|
TROSerializer(ASerializer).ReadUTF8String('Usuario', l_Usuario);
|
|
Usuario := l_Usuario;
|
|
l_Perfiles := Perfiles;
|
|
TROSerializer(ASerializer).ReadArray('Perfiles', StringArray, l_Perfiles);
|
|
if Perfiles <> l_Perfiles then Perfiles.Free;
|
|
Perfiles := l_Perfiles;
|
|
l_Empresas := Empresas;
|
|
TROSerializer(ASerializer).ReadArray('Empresas', TRdxEmpresasArray, l_Empresas);
|
|
if Empresas <> l_Empresas then Empresas.Free;
|
|
Empresas := l_Empresas;
|
|
end
|
|
else begin
|
|
l_Empresas := Empresas;
|
|
TROSerializer(ASerializer).ReadArray('Empresas', TRdxEmpresasArray, l_Empresas);
|
|
if Empresas <> l_Empresas then Empresas.Free;
|
|
Empresas := l_Empresas;
|
|
l_Perfiles := Perfiles;
|
|
TROSerializer(ASerializer).ReadArray('Perfiles', StringArray, l_Perfiles);
|
|
if Perfiles <> l_Perfiles then Perfiles.Free;
|
|
Perfiles := l_Perfiles;
|
|
l_SessionID := SessionID;
|
|
TROSerializer(ASerializer).ReadUTF8String('SessionID', l_SessionID);
|
|
SessionID := l_SessionID;
|
|
l_UserID := UserID;
|
|
TROSerializer(ASerializer).ReadInteger('UserID', otSLong, l_UserID);
|
|
UserID := l_UserID;
|
|
l_Usuario := Usuario;
|
|
TROSerializer(ASerializer).ReadUTF8String('Usuario', l_Usuario);
|
|
Usuario := l_Usuario;
|
|
end;
|
|
end;
|
|
|
|
procedure TRdxLoginInfo.WriteComplex(ASerializer: TObject);
|
|
var
|
|
l_Empresas: TRdxEmpresasArray;
|
|
l_Perfiles: StringArray;
|
|
l_SessionID: String;
|
|
l_UserID: Integer;
|
|
l_Usuario: String;
|
|
begin
|
|
if TROSerializer(ASerializer).RecordStrictOrder then begin
|
|
l_UserID := UserID;
|
|
TROSerializer(ASerializer).WriteInteger('UserID', otSLong, l_UserID);
|
|
l_SessionID := SessionID;
|
|
TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
|
|
l_Usuario := Usuario;
|
|
TROSerializer(ASerializer).WriteUTF8String('Usuario', l_Usuario);
|
|
l_Perfiles := Perfiles;
|
|
TROSerializer(ASerializer).WriteArray('Perfiles', l_Perfiles);
|
|
l_Empresas := Empresas;
|
|
TROSerializer(ASerializer).WriteArray('Empresas', l_Empresas);
|
|
end
|
|
else begin
|
|
l_Empresas := Empresas;
|
|
TROSerializer(ASerializer).WriteArray('Empresas', l_Empresas);
|
|
l_Perfiles := Perfiles;
|
|
TROSerializer(ASerializer).WriteArray('Perfiles', l_Perfiles);
|
|
l_SessionID := SessionID;
|
|
TROSerializer(ASerializer).WriteUTF8String('SessionID', l_SessionID);
|
|
l_UserID := UserID;
|
|
TROSerializer(ASerializer).WriteInteger('UserID', otSLong, l_UserID);
|
|
l_Usuario := Usuario;
|
|
TROSerializer(ASerializer).WriteUTF8String('Usuario', l_Usuario);
|
|
end;
|
|
end;
|
|
|
|
{ TRdxLoginInfoCollection }
|
|
constructor TRdxLoginInfoCollection.Create;
|
|
begin
|
|
inherited Create(TRdxLoginInfo);
|
|
end;
|
|
|
|
constructor TRdxLoginInfoCollection.Create(aItemClass: TCollectionItemClass);
|
|
begin
|
|
inherited Create(aItemClass);
|
|
end;
|
|
|
|
function TRdxLoginInfoCollection.Add: TRdxLoginInfo;
|
|
begin
|
|
result := TRdxLoginInfo(inherited Add);
|
|
end;
|
|
|
|
function TRdxLoginInfoCollection.GetItems(aIndex: integer): TRdxLoginInfo;
|
|
begin
|
|
result := TRdxLoginInfo(inherited Items[aIndex]);
|
|
end;
|
|
|
|
procedure TRdxLoginInfoCollection.SetItems(aIndex: integer; const Value: TRdxLoginInfo);
|
|
begin
|
|
TRdxLoginInfo(inherited Items[aIndex]).Assign(Value);
|
|
end;
|
|
|
|
{ CosrvContactos }
|
|
|
|
class function CosrvContactos.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvContactos;
|
|
begin
|
|
result := TsrvContactos_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
{ TsrvContactos_Proxy }
|
|
|
|
function TsrvContactos_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvContactos';
|
|
end;
|
|
|
|
function TsrvContactos_Proxy.GenerateFichaEmpleadoReport(const EmpleadoID: String): Binary;
|
|
begin
|
|
try
|
|
result := nil;
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateFichaEmpleadoReport');
|
|
__Message.Write('EmpleadoID', TypeInfo(String), EmpleadoID, []);
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(Binary), result, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
function TsrvContactos_Proxy.GenerateEtiquetasReport(const ContactosID: String): Binary;
|
|
begin
|
|
try
|
|
result := nil;
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'GenerateEtiquetasReport');
|
|
__Message.Write('ContactosID', TypeInfo(String), ContactosID, []);
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(Binary), result, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
{ CosrvLogin }
|
|
|
|
class function CosrvLogin.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvLogin;
|
|
begin
|
|
result := TsrvLogin_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
{ TsrvLogin_Proxy }
|
|
|
|
function TsrvLogin_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvLogin';
|
|
end;
|
|
|
|
function TsrvLogin_Proxy.Login(const User: String; const Password: String; out LoginInfo: TRdxLoginInfo): Boolean;
|
|
begin
|
|
try
|
|
LoginInfo := nil;
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'Login');
|
|
__Message.Write('User', TypeInfo(String), User, []);
|
|
__Message.Write('Password', TypeInfo(String), Password, []);
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(Boolean), result, []);
|
|
__Message.Read('LoginInfo', TypeInfo(FactuGES_Intf.TRdxLoginInfo), LoginInfo, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
procedure TsrvLogin_Proxy.Logout;
|
|
begin
|
|
try
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'Logout');
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
finally
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
function TsrvLogin_Proxy.Ping: Boolean;
|
|
begin
|
|
try
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'Ping');
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(Boolean), result, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
{ CosrvEmpresas }
|
|
|
|
class function CosrvEmpresas.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvEmpresas;
|
|
begin
|
|
result := TsrvEmpresas_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
function TsrvEmpresas_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvEmpresas';
|
|
end;
|
|
|
|
{ CosrvConfiguracion }
|
|
|
|
class function CosrvConfiguracion.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvConfiguracion;
|
|
begin
|
|
result := TsrvConfiguracion_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
{ TsrvConfiguracion_Proxy }
|
|
|
|
function TsrvConfiguracion_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvConfiguracion';
|
|
end;
|
|
|
|
function TsrvConfiguracion_Proxy.darValor(const CODIGO: String): String;
|
|
begin
|
|
try
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'FactuGES', __InterfaceName, 'darValor');
|
|
__Message.Write('CODIGO', TypeInfo(String), CODIGO, []);
|
|
__Message.Finalize;
|
|
|
|
__TransportChannel.Dispatch(__Message);
|
|
|
|
__Message.Read('Result', TypeInfo(String), result, []);
|
|
finally
|
|
__Message.UnsetAttributes(__TransportChannel);
|
|
__Message.FreeStream;
|
|
end
|
|
end;
|
|
|
|
{ CosrvFamilias }
|
|
|
|
class function CosrvFamilias.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFamilias;
|
|
begin
|
|
result := TsrvFamilias_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
function TsrvFamilias_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvFamilias';
|
|
end;
|
|
|
|
{ CosrvFormasPago }
|
|
|
|
class function CosrvFormasPago.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvFormasPago;
|
|
begin
|
|
result := TsrvFormasPago_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
function TsrvFormasPago_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvFormasPago';
|
|
end;
|
|
|
|
{ CosrvTiposIVA }
|
|
|
|
class function CosrvTiposIVA.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvTiposIVA;
|
|
begin
|
|
result := TsrvTiposIVA_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
function TsrvTiposIVA_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvTiposIVA';
|
|
end;
|
|
|
|
{ CosrvUsuarios }
|
|
|
|
class function CosrvUsuarios.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): IsrvUsuarios;
|
|
begin
|
|
result := TsrvUsuarios_Proxy.Create(aMessage, aTransportChannel);
|
|
end;
|
|
|
|
function TsrvUsuarios_Proxy.__GetInterfaceName:string;
|
|
begin
|
|
result := 'srvUsuarios';
|
|
end;
|
|
|
|
initialization
|
|
RegisterROClass(TRdxLoginInfo);
|
|
RegisterROClass(TRdxEmpresasArray);
|
|
RegisterProxyClass(IsrvContactos_IID, TsrvContactos_Proxy);
|
|
RegisterProxyClass(IsrvLogin_IID, TsrvLogin_Proxy);
|
|
RegisterProxyClass(IsrvEmpresas_IID, TsrvEmpresas_Proxy);
|
|
RegisterProxyClass(IsrvConfiguracion_IID, TsrvConfiguracion_Proxy);
|
|
RegisterProxyClass(IsrvFamilias_IID, TsrvFamilias_Proxy);
|
|
RegisterProxyClass(IsrvFormasPago_IID, TsrvFormasPago_Proxy);
|
|
RegisterProxyClass(IsrvTiposIVA_IID, TsrvTiposIVA_Proxy);
|
|
RegisterProxyClass(IsrvUsuarios_IID, TsrvUsuarios_Proxy);
|
|
|
|
|
|
finalization
|
|
UnregisterROClass(TRdxLoginInfo);
|
|
UnregisterROClass(TRdxEmpresasArray);
|
|
UnregisterProxyClass(IsrvContactos_IID);
|
|
UnregisterProxyClass(IsrvLogin_IID);
|
|
UnregisterProxyClass(IsrvEmpresas_IID);
|
|
UnregisterProxyClass(IsrvConfiguracion_IID);
|
|
UnregisterProxyClass(IsrvFamilias_IID);
|
|
UnregisterProxyClass(IsrvFormasPago_IID);
|
|
UnregisterProxyClass(IsrvTiposIVA_IID);
|
|
UnregisterProxyClass(IsrvUsuarios_IID);
|
|
|
|
end.
|