git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES/trunk@5 9a1d36f3-7752-2d40-8ccb-50eb49674c68
168 lines
5.7 KiB
ObjectPascal
168 lines
5.7 KiB
ObjectPascal
unit schIntervalosServer_Intf;
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schIntervalosClient_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_IntervalosDelta = '{F0E5C34F-94F5-4D82-B94C-E6D04402B872}';
|
|
|
|
type
|
|
{ IIntervalosDelta }
|
|
IIntervalosDelta = interface(IIntervalos)
|
|
['{F0E5C34F-94F5-4D82-B94C-E6D04402B872}']
|
|
{ Property getters and setters }
|
|
function GetOldCODIGOValue : Integer;
|
|
function GetOldNOMBREValue : String;
|
|
function GetOldDIASValue : Integer;
|
|
function GetOldMESESValue : Integer;
|
|
function GetOldANOSValue : Integer;
|
|
|
|
{ Properties }
|
|
property OldCODIGO : Integer read GetOldCODIGOValue;
|
|
property OldNOMBRE : String read GetOldNOMBREValue;
|
|
property OldDIAS : Integer read GetOldDIASValue;
|
|
property OldMESES : Integer read GetOldMESESValue;
|
|
property OldANOS : Integer read GetOldANOSValue;
|
|
end;
|
|
|
|
{ TIntervalosBusinessProcessorRules }
|
|
TIntervalosBusinessProcessorRules = class(TDABusinessProcessorRules, IIntervalos, IIntervalosDelta)
|
|
private
|
|
protected
|
|
{ Property getters and setters }
|
|
function GetCODIGOValue: Integer; virtual;
|
|
function GetOldCODIGOValue: Integer; virtual;
|
|
procedure SetCODIGOValue(const aValue: Integer); virtual;
|
|
function GetNOMBREValue: String; virtual;
|
|
function GetOldNOMBREValue: String; virtual;
|
|
procedure SetNOMBREValue(const aValue: String); virtual;
|
|
function GetDIASValue: Integer; virtual;
|
|
function GetOldDIASValue: Integer; virtual;
|
|
procedure SetDIASValue(const aValue: Integer); virtual;
|
|
function GetMESESValue: Integer; virtual;
|
|
function GetOldMESESValue: Integer; virtual;
|
|
procedure SetMESESValue(const aValue: Integer); virtual;
|
|
function GetANOSValue: Integer; virtual;
|
|
function GetOldANOSValue: Integer; virtual;
|
|
procedure SetANOSValue(const aValue: Integer); virtual;
|
|
|
|
{ Properties }
|
|
property CODIGO : Integer read GetCODIGOValue write SetCODIGOValue;
|
|
property OldCODIGO : Integer read GetOldCODIGOValue;
|
|
property NOMBRE : String read GetNOMBREValue write SetNOMBREValue;
|
|
property OldNOMBRE : String read GetOldNOMBREValue;
|
|
property DIAS : Integer read GetDIASValue write SetDIASValue;
|
|
property OldDIAS : Integer read GetOldDIASValue;
|
|
property MESES : Integer read GetMESESValue write SetMESESValue;
|
|
property OldMESES : Integer read GetOldMESESValue;
|
|
property ANOS : Integer read GetANOSValue write SetANOSValue;
|
|
property OldANOS : Integer read GetOldANOSValue;
|
|
|
|
public
|
|
constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
|
|
destructor Destroy; override;
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses
|
|
Variants, uROBinaryHelpers;
|
|
|
|
{ TIntervalosBusinessProcessorRules }
|
|
constructor TIntervalosBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
destructor TIntervalosBusinessProcessorRules.Destroy;
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetCODIGOValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosCODIGO];
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetOldCODIGOValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_IntervalosCODIGO];
|
|
end;
|
|
|
|
procedure TIntervalosBusinessProcessorRules.SetCODIGOValue(const aValue: Integer);
|
|
begin
|
|
BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosCODIGO] := aValue;
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetNOMBREValue: String;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosNOMBRE];
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetOldNOMBREValue: String;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_IntervalosNOMBRE];
|
|
end;
|
|
|
|
procedure TIntervalosBusinessProcessorRules.SetNOMBREValue(const aValue: String);
|
|
begin
|
|
BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosNOMBRE] := aValue;
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetDIASValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosDIAS];
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetOldDIASValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_IntervalosDIAS];
|
|
end;
|
|
|
|
procedure TIntervalosBusinessProcessorRules.SetDIASValue(const aValue: Integer);
|
|
begin
|
|
BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosDIAS] := aValue;
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetMESESValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosMESES];
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetOldMESESValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_IntervalosMESES];
|
|
end;
|
|
|
|
procedure TIntervalosBusinessProcessorRules.SetMESESValue(const aValue: Integer);
|
|
begin
|
|
BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosMESES] := aValue;
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetANOSValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosANOS];
|
|
end;
|
|
|
|
function TIntervalosBusinessProcessorRules.GetOldANOSValue: Integer;
|
|
begin
|
|
result := BusinessProcessor.CurrentChange.OldValueByName[fld_IntervalosANOS];
|
|
end;
|
|
|
|
procedure TIntervalosBusinessProcessorRules.SetANOSValue(const aValue: Integer);
|
|
begin
|
|
BusinessProcessor.CurrentChange.NewValueByName[fld_IntervalosANOS] := aValue;
|
|
end;
|
|
|
|
|
|
initialization
|
|
RegisterBusinessProcessorRules(RID_IntervalosDelta, TIntervalosBusinessProcessorRules);
|
|
|
|
end.
|