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/Cuentas/Reglas/schCuentasServer_Intf.pas
2007-06-21 16:02:50 +00:00

236 lines
8.9 KiB
ObjectPascal

unit schCuentasServer_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schCuentasClient_Intf;
const
{ Delta 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_CuentasDelta = '{E2548CDF-39FB-4108-AED9-015ADCB51AD5}';
type
{ ICuentasDelta }
ICuentasDelta = interface(ICuentas)
['{E2548CDF-39FB-4108-AED9-015ADCB51AD5}']
{ Property getters and setters }
function GetOldCODIGOEMPRESAValue : Integer;
function GetOldCODIGOValue : Integer;
function GetOldFECHAALTAValue : DateTime;
function GetOldUSUARIOValue : String;
function GetOldNOMBREValue : String;
function GetOldOTROSDATOSValue : IROStrings;
function GetOldULTIMOCIERREValue : DateTime;
function GetOldPENULTIMOCIERREValue : DateTime;
{ Properties }
property OldCODIGOEMPRESA : Integer read GetOldCODIGOEMPRESAValue;
property OldCODIGO : Integer read GetOldCODIGOValue;
property OldFECHAALTA : DateTime read GetOldFECHAALTAValue;
property OldUSUARIO : String read GetOldUSUARIOValue;
property OldNOMBRE : String read GetOldNOMBREValue;
property OldOTROSDATOS : IROStrings read GetOldOTROSDATOSValue;
property OldULTIMOCIERRE : DateTime read GetOldULTIMOCIERREValue;
property OldPENULTIMOCIERRE : DateTime read GetOldPENULTIMOCIERREValue;
end;
{ TCuentasBusinessProcessorRules }
TCuentasBusinessProcessorRules = class(TDABusinessProcessorRules, ICuentas, ICuentasDelta)
private
protected
{ Property getters and setters }
function GetCODIGOEMPRESAValue: Integer; virtual;
function GetOldCODIGOEMPRESAValue: Integer; virtual;
procedure SetCODIGOEMPRESAValue(const aValue: Integer); virtual;
function GetCODIGOValue: Integer; virtual;
function GetOldCODIGOValue: Integer; virtual;
procedure SetCODIGOValue(const aValue: Integer); virtual;
function GetFECHAALTAValue: DateTime; virtual;
function GetOldFECHAALTAValue: DateTime; virtual;
procedure SetFECHAALTAValue(const aValue: DateTime); virtual;
function GetUSUARIOValue: String; virtual;
function GetOldUSUARIOValue: String; virtual;
procedure SetUSUARIOValue(const aValue: String); virtual;
function GetNOMBREValue: String; virtual;
function GetOldNOMBREValue: String; virtual;
procedure SetNOMBREValue(const aValue: String); virtual;
function GetOTROSDATOSValue: IROStrings; virtual;
function GetOldOTROSDATOSValue: IROStrings; virtual;
procedure SetOTROSDATOSValue(const aValue: IROStrings); virtual;
function GetULTIMOCIERREValue: DateTime; virtual;
function GetOldULTIMOCIERREValue: DateTime; virtual;
procedure SetULTIMOCIERREValue(const aValue: DateTime); virtual;
function GetPENULTIMOCIERREValue: DateTime; virtual;
function GetOldPENULTIMOCIERREValue: DateTime; virtual;
procedure SetPENULTIMOCIERREValue(const aValue: DateTime); virtual;
{ Properties }
property CODIGOEMPRESA : Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property OldCODIGOEMPRESA : Integer read GetOldCODIGOEMPRESAValue;
property CODIGO : Integer read GetCODIGOValue write SetCODIGOValue;
property OldCODIGO : Integer read GetOldCODIGOValue;
property FECHAALTA : DateTime read GetFECHAALTAValue write SetFECHAALTAValue;
property OldFECHAALTA : DateTime read GetOldFECHAALTAValue;
property USUARIO : String read GetUSUARIOValue write SetUSUARIOValue;
property OldUSUARIO : String read GetOldUSUARIOValue;
property NOMBRE : String read GetNOMBREValue write SetNOMBREValue;
property OldNOMBRE : String read GetOldNOMBREValue;
property OTROSDATOS : IROStrings read GetOTROSDATOSValue write SetOTROSDATOSValue;
property OldOTROSDATOS : IROStrings read GetOldOTROSDATOSValue;
property ULTIMOCIERRE : DateTime read GetULTIMOCIERREValue write SetULTIMOCIERREValue;
property OldULTIMOCIERRE : DateTime read GetOldULTIMOCIERREValue;
property PENULTIMOCIERRE : DateTime read GetPENULTIMOCIERREValue write SetPENULTIMOCIERREValue;
property OldPENULTIMOCIERRE : DateTime read GetOldPENULTIMOCIERREValue;
public
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
destructor Destroy; override;
end;
implementation
uses
Variants, uROBinaryHelpers;
{ TCuentasBusinessProcessorRules }
constructor TCuentasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TCuentasBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TCuentasBusinessProcessorRules.GetCODIGOEMPRESAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasCODIGOEMPRESA];
end;
function TCuentasBusinessProcessorRules.GetOldCODIGOEMPRESAValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasCODIGOEMPRESA];
end;
procedure TCuentasBusinessProcessorRules.SetCODIGOEMPRESAValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasCODIGOEMPRESA] := aValue;
end;
function TCuentasBusinessProcessorRules.GetCODIGOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasCODIGO];
end;
function TCuentasBusinessProcessorRules.GetOldCODIGOValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasCODIGO];
end;
procedure TCuentasBusinessProcessorRules.SetCODIGOValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasCODIGO] := aValue;
end;
function TCuentasBusinessProcessorRules.GetFECHAALTAValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasFECHAALTA];
end;
function TCuentasBusinessProcessorRules.GetOldFECHAALTAValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasFECHAALTA];
end;
procedure TCuentasBusinessProcessorRules.SetFECHAALTAValue(const aValue: DateTime);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasFECHAALTA] := aValue;
end;
function TCuentasBusinessProcessorRules.GetUSUARIOValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasUSUARIO];
end;
function TCuentasBusinessProcessorRules.GetOldUSUARIOValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasUSUARIO];
end;
procedure TCuentasBusinessProcessorRules.SetUSUARIOValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasUSUARIO] := aValue;
end;
function TCuentasBusinessProcessorRules.GetNOMBREValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasNOMBRE];
end;
function TCuentasBusinessProcessorRules.GetOldNOMBREValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasNOMBRE];
end;
procedure TCuentasBusinessProcessorRules.SetNOMBREValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasNOMBRE] := aValue;
end;
function TCuentasBusinessProcessorRules.GetOTROSDATOSValue: IROStrings;
begin
result := NewROStrings();
result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasOTROSDATOS];
end;
function TCuentasBusinessProcessorRules.GetOldOTROSDATOSValue: IROStrings;
begin
result := NewROStrings();
result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasOTROSDATOS];
end;
procedure TCuentasBusinessProcessorRules.SetOTROSDATOSValue(const aValue: IROStrings);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasOTROSDATOS] := aValue.Text;
end;
function TCuentasBusinessProcessorRules.GetULTIMOCIERREValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasULTIMOCIERRE];
end;
function TCuentasBusinessProcessorRules.GetOldULTIMOCIERREValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasULTIMOCIERRE];
end;
procedure TCuentasBusinessProcessorRules.SetULTIMOCIERREValue(const aValue: DateTime);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasULTIMOCIERRE] := aValue;
end;
function TCuentasBusinessProcessorRules.GetPENULTIMOCIERREValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasPENULTIMOCIERRE];
end;
function TCuentasBusinessProcessorRules.GetOldPENULTIMOCIERREValue: DateTime;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_CuentasPENULTIMOCIERRE];
end;
procedure TCuentasBusinessProcessorRules.SetPENULTIMOCIERREValue(const aValue: DateTime);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_CuentasPENULTIMOCIERRE] := aValue;
end;
initialization
RegisterBusinessProcessorRules(RID_CuentasDelta, TCuentasBusinessProcessorRules);
end.