Tecsitel_FactuGES2/Source/Modulos/Formas de pago/Model/schFormasPagoClient_Intf.pas

527 lines
19 KiB
ObjectPascal

unit schFormasPagoClient_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
const
{ Data table rules ids
Feel free to change them to something more human readable
but make sure they are unique in the context of your application }
RID_FormasPago = '{0AC9176F-E9B6-43BA-B03E-0973D7074140}';
RID_FormasPagoPlazos = '{F02E8B61-F06F-48FE-B705-0C42FB672FB5}';
{ Data table names }
nme_FormasPago = 'FormasPago';
nme_FormasPagoPlazos = 'FormasPagoPlazos';
{ FormasPago fields }
fld_FormasPagoID = 'ID';
fld_FormasPagoREFERENCIA = 'REFERENCIA';
fld_FormasPagoDESCRIPCION = 'DESCRIPCION';
fld_FormasPagoTITULAR = 'TITULAR';
fld_FormasPagoENTIDAD = 'ENTIDAD';
fld_FormasPagoSUCURSAL = 'SUCURSAL';
fld_FormasPagoDC = 'DC';
fld_FormasPagoCUENTA = 'CUENTA';
{ FormasPago field indexes }
idx_FormasPagoID = 0;
idx_FormasPagoREFERENCIA = 1;
idx_FormasPagoDESCRIPCION = 2;
idx_FormasPagoTITULAR = 3;
idx_FormasPagoENTIDAD = 4;
idx_FormasPagoSUCURSAL = 5;
idx_FormasPagoDC = 6;
idx_FormasPagoCUENTA = 7;
{ FormasPagoPlazos fields }
fld_FormasPagoPlazosID = 'ID';
fld_FormasPagoPlazosID_FORMA_PAGO = 'ID_FORMA_PAGO';
fld_FormasPagoPlazosNUM_DIAS = 'NUM_DIAS';
fld_FormasPagoPlazosPORCENTAJE = 'PORCENTAJE';
{ FormasPagoPlazos field indexes }
idx_FormasPagoPlazosID = 0;
idx_FormasPagoPlazosID_FORMA_PAGO = 1;
idx_FormasPagoPlazosNUM_DIAS = 2;
idx_FormasPagoPlazosPORCENTAJE = 3;
type
{ IFormasPago }
IFormasPago = interface(IDAStronglyTypedDataTable)
['{2906012F-51D2-4722-A42A-1A1F0B5F5DA3}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetIDIsNull: Boolean;
procedure SetIDIsNull(const aValue: Boolean);
function GetREFERENCIAValue: String;
procedure SetREFERENCIAValue(const aValue: String);
function GetREFERENCIAIsNull: Boolean;
procedure SetREFERENCIAIsNull(const aValue: Boolean);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetDESCRIPCIONIsNull: Boolean;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
function GetTITULARValue: String;
procedure SetTITULARValue(const aValue: String);
function GetTITULARIsNull: Boolean;
procedure SetTITULARIsNull(const aValue: Boolean);
function GetENTIDADValue: String;
procedure SetENTIDADValue(const aValue: String);
function GetENTIDADIsNull: Boolean;
procedure SetENTIDADIsNull(const aValue: Boolean);
function GetSUCURSALValue: String;
procedure SetSUCURSALValue(const aValue: String);
function GetSUCURSALIsNull: Boolean;
procedure SetSUCURSALIsNull(const aValue: Boolean);
function GetDCValue: String;
procedure SetDCValue(const aValue: String);
function GetDCIsNull: Boolean;
procedure SetDCIsNull(const aValue: Boolean);
function GetCUENTAValue: String;
procedure SetCUENTAValue(const aValue: String);
function GetCUENTAIsNull: Boolean;
procedure SetCUENTAIsNull(const aValue: Boolean);
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property TITULAR: String read GetTITULARValue write SetTITULARValue;
property TITULARIsNull: Boolean read GetTITULARIsNull write SetTITULARIsNull;
property ENTIDAD: String read GetENTIDADValue write SetENTIDADValue;
property ENTIDADIsNull: Boolean read GetENTIDADIsNull write SetENTIDADIsNull;
property SUCURSAL: String read GetSUCURSALValue write SetSUCURSALValue;
property SUCURSALIsNull: Boolean read GetSUCURSALIsNull write SetSUCURSALIsNull;
property DC: String read GetDCValue write SetDCValue;
property DCIsNull: Boolean read GetDCIsNull write SetDCIsNull;
property CUENTA: String read GetCUENTAValue write SetCUENTAValue;
property CUENTAIsNull: Boolean read GetCUENTAIsNull write SetCUENTAIsNull;
end;
{ TFormasPagoDataTableRules }
TFormasPagoDataTableRules = class(TDADataTableRules, IFormasPago)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetIDIsNull: Boolean; virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetREFERENCIAValue: String; virtual;
procedure SetREFERENCIAValue(const aValue: String); virtual;
function GetREFERENCIAIsNull: Boolean; virtual;
procedure SetREFERENCIAIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
function GetTITULARValue: String; virtual;
procedure SetTITULARValue(const aValue: String); virtual;
function GetTITULARIsNull: Boolean; virtual;
procedure SetTITULARIsNull(const aValue: Boolean); virtual;
function GetENTIDADValue: String; virtual;
procedure SetENTIDADValue(const aValue: String); virtual;
function GetENTIDADIsNull: Boolean; virtual;
procedure SetENTIDADIsNull(const aValue: Boolean); virtual;
function GetSUCURSALValue: String; virtual;
procedure SetSUCURSALValue(const aValue: String); virtual;
function GetSUCURSALIsNull: Boolean; virtual;
procedure SetSUCURSALIsNull(const aValue: Boolean); virtual;
function GetDCValue: String; virtual;
procedure SetDCValue(const aValue: String); virtual;
function GetDCIsNull: Boolean; virtual;
procedure SetDCIsNull(const aValue: Boolean); virtual;
function GetCUENTAValue: String; virtual;
procedure SetCUENTAValue(const aValue: String); virtual;
function GetCUENTAIsNull: Boolean; virtual;
procedure SetCUENTAIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue;
property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
property TITULAR: String read GetTITULARValue write SetTITULARValue;
property TITULARIsNull: Boolean read GetTITULARIsNull write SetTITULARIsNull;
property ENTIDAD: String read GetENTIDADValue write SetENTIDADValue;
property ENTIDADIsNull: Boolean read GetENTIDADIsNull write SetENTIDADIsNull;
property SUCURSAL: String read GetSUCURSALValue write SetSUCURSALValue;
property SUCURSALIsNull: Boolean read GetSUCURSALIsNull write SetSUCURSALIsNull;
property DC: String read GetDCValue write SetDCValue;
property DCIsNull: Boolean read GetDCIsNull write SetDCIsNull;
property CUENTA: String read GetCUENTAValue write SetCUENTAValue;
property CUENTAIsNull: Boolean read GetCUENTAIsNull write SetCUENTAIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ IFormasPagoPlazos }
IFormasPagoPlazos = interface(IDAStronglyTypedDataTable)
['{6C99169B-3B96-4E95-9886-BFBDAF1C5836}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetIDIsNull: Boolean;
procedure SetIDIsNull(const aValue: Boolean);
function GetID_FORMA_PAGOValue: Integer;
procedure SetID_FORMA_PAGOValue(const aValue: Integer);
function GetID_FORMA_PAGOIsNull: Boolean;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean);
function GetNUM_DIASValue: SmallInt;
procedure SetNUM_DIASValue(const aValue: SmallInt);
function GetNUM_DIASIsNull: Boolean;
procedure SetNUM_DIASIsNull(const aValue: Boolean);
function GetPORCENTAJEValue: Float;
procedure SetPORCENTAJEValue(const aValue: Float);
function GetPORCENTAJEIsNull: Boolean;
procedure SetPORCENTAJEIsNull(const aValue: Boolean);
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
property NUM_DIAS: SmallInt read GetNUM_DIASValue write SetNUM_DIASValue;
property NUM_DIASIsNull: Boolean read GetNUM_DIASIsNull write SetNUM_DIASIsNull;
property PORCENTAJE: Float read GetPORCENTAJEValue write SetPORCENTAJEValue;
property PORCENTAJEIsNull: Boolean read GetPORCENTAJEIsNull write SetPORCENTAJEIsNull;
end;
{ TFormasPagoPlazosDataTableRules }
TFormasPagoPlazosDataTableRules = class(TDADataTableRules, IFormasPagoPlazos)
private
protected
{ Property getters and setters }
function GetIDValue: Integer; virtual;
procedure SetIDValue(const aValue: Integer); virtual;
function GetIDIsNull: Boolean; virtual;
procedure SetIDIsNull(const aValue: Boolean); virtual;
function GetID_FORMA_PAGOValue: Integer; virtual;
procedure SetID_FORMA_PAGOValue(const aValue: Integer); virtual;
function GetID_FORMA_PAGOIsNull: Boolean; virtual;
procedure SetID_FORMA_PAGOIsNull(const aValue: Boolean); virtual;
function GetNUM_DIASValue: SmallInt; virtual;
procedure SetNUM_DIASValue(const aValue: SmallInt); virtual;
function GetNUM_DIASIsNull: Boolean; virtual;
procedure SetNUM_DIASIsNull(const aValue: Boolean); virtual;
function GetPORCENTAJEValue: Float; virtual;
procedure SetPORCENTAJEValue(const aValue: Float); virtual;
function GetPORCENTAJEIsNull: Boolean; virtual;
procedure SetPORCENTAJEIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_FORMA_PAGO: Integer read GetID_FORMA_PAGOValue write SetID_FORMA_PAGOValue;
property ID_FORMA_PAGOIsNull: Boolean read GetID_FORMA_PAGOIsNull write SetID_FORMA_PAGOIsNull;
property NUM_DIAS: SmallInt read GetNUM_DIASValue write SetNUM_DIASValue;
property NUM_DIASIsNull: Boolean read GetNUM_DIASIsNull write SetNUM_DIASIsNull;
property PORCENTAJE: Float read GetPORCENTAJEValue write SetPORCENTAJEValue;
property PORCENTAJEIsNull: Boolean read GetPORCENTAJEIsNull write SetPORCENTAJEIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants, uROBinaryHelpers;
{ TFormasPagoDataTableRules }
constructor TFormasPagoDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TFormasPagoDataTableRules.Destroy;
begin
inherited;
end;
function TFormasPagoDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_FormasPagoID].AsInteger;
end;
procedure TFormasPagoDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_FormasPagoID].AsInteger := aValue;
end;
function TFormasPagoDataTableRules.GetIDIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoID].IsNull;
end;
procedure TFormasPagoDataTableRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoID].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetREFERENCIAValue: String;
begin
result := DataTable.Fields[idx_FormasPagoREFERENCIA].AsString;
end;
procedure TFormasPagoDataTableRules.SetREFERENCIAValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoREFERENCIA].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetREFERENCIAIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoREFERENCIA].IsNull;
end;
procedure TFormasPagoDataTableRules.SetREFERENCIAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoREFERENCIA].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_FormasPagoDESCRIPCION].AsString;
end;
procedure TFormasPagoDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoDESCRIPCION].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetDESCRIPCIONIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoDESCRIPCION].IsNull;
end;
procedure TFormasPagoDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoDESCRIPCION].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetTITULARValue: String;
begin
result := DataTable.Fields[idx_FormasPagoTITULAR].AsString;
end;
procedure TFormasPagoDataTableRules.SetTITULARValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoTITULAR].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetTITULARIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoTITULAR].IsNull;
end;
procedure TFormasPagoDataTableRules.SetTITULARIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoTITULAR].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetENTIDADValue: String;
begin
result := DataTable.Fields[idx_FormasPagoENTIDAD].AsString;
end;
procedure TFormasPagoDataTableRules.SetENTIDADValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoENTIDAD].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetENTIDADIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoENTIDAD].IsNull;
end;
procedure TFormasPagoDataTableRules.SetENTIDADIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoENTIDAD].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetSUCURSALValue: String;
begin
result := DataTable.Fields[idx_FormasPagoSUCURSAL].AsString;
end;
procedure TFormasPagoDataTableRules.SetSUCURSALValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoSUCURSAL].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetSUCURSALIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoSUCURSAL].IsNull;
end;
procedure TFormasPagoDataTableRules.SetSUCURSALIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoSUCURSAL].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetDCValue: String;
begin
result := DataTable.Fields[idx_FormasPagoDC].AsString;
end;
procedure TFormasPagoDataTableRules.SetDCValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoDC].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetDCIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoDC].IsNull;
end;
procedure TFormasPagoDataTableRules.SetDCIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoDC].AsVariant := Null;
end;
function TFormasPagoDataTableRules.GetCUENTAValue: String;
begin
result := DataTable.Fields[idx_FormasPagoCUENTA].AsString;
end;
procedure TFormasPagoDataTableRules.SetCUENTAValue(const aValue: String);
begin
DataTable.Fields[idx_FormasPagoCUENTA].AsString := aValue;
end;
function TFormasPagoDataTableRules.GetCUENTAIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoCUENTA].IsNull;
end;
procedure TFormasPagoDataTableRules.SetCUENTAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoCUENTA].AsVariant := Null;
end;
{ TFormasPagoPlazosDataTableRules }
constructor TFormasPagoPlazosDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TFormasPagoPlazosDataTableRules.Destroy;
begin
inherited;
end;
function TFormasPagoPlazosDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_FormasPagoPlazosID].AsInteger;
end;
procedure TFormasPagoPlazosDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_FormasPagoPlazosID].AsInteger := aValue;
end;
function TFormasPagoPlazosDataTableRules.GetIDIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoPlazosID].IsNull;
end;
procedure TFormasPagoPlazosDataTableRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoPlazosID].AsVariant := Null;
end;
function TFormasPagoPlazosDataTableRules.GetID_FORMA_PAGOValue: Integer;
begin
result := DataTable.Fields[idx_FormasPagoPlazosID_FORMA_PAGO].AsInteger;
end;
procedure TFormasPagoPlazosDataTableRules.SetID_FORMA_PAGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_FormasPagoPlazosID_FORMA_PAGO].AsInteger := aValue;
end;
function TFormasPagoPlazosDataTableRules.GetID_FORMA_PAGOIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoPlazosID_FORMA_PAGO].IsNull;
end;
procedure TFormasPagoPlazosDataTableRules.SetID_FORMA_PAGOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoPlazosID_FORMA_PAGO].AsVariant := Null;
end;
function TFormasPagoPlazosDataTableRules.GetNUM_DIASValue: SmallInt;
begin
result := DataTable.Fields[idx_FormasPagoPlazosNUM_DIAS].AsSmallInt;
end;
procedure TFormasPagoPlazosDataTableRules.SetNUM_DIASValue(const aValue: SmallInt);
begin
DataTable.Fields[idx_FormasPagoPlazosNUM_DIAS].AsSmallInt := aValue;
end;
function TFormasPagoPlazosDataTableRules.GetNUM_DIASIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoPlazosNUM_DIAS].IsNull;
end;
procedure TFormasPagoPlazosDataTableRules.SetNUM_DIASIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoPlazosNUM_DIAS].AsVariant := Null;
end;
function TFormasPagoPlazosDataTableRules.GetPORCENTAJEValue: Float;
begin
result := DataTable.Fields[idx_FormasPagoPlazosPORCENTAJE].AsFloat;
end;
procedure TFormasPagoPlazosDataTableRules.SetPORCENTAJEValue(const aValue: Float);
begin
DataTable.Fields[idx_FormasPagoPlazosPORCENTAJE].AsFloat := aValue;
end;
function TFormasPagoPlazosDataTableRules.GetPORCENTAJEIsNull: boolean;
begin
result := DataTable.Fields[idx_FormasPagoPlazosPORCENTAJE].IsNull;
end;
procedure TFormasPagoPlazosDataTableRules.SetPORCENTAJEIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_FormasPagoPlazosPORCENTAJE].AsVariant := Null;
end;
initialization
RegisterDataTableRules(RID_FormasPago, TFormasPagoDataTableRules);
RegisterDataTableRules(RID_FormasPagoPlazos, TFormasPagoPlazosDataTableRules);
end.