unit schTarifasServer_Intf; interface uses Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, schTarifasClient_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_TarifasDelta = '{21C7FA08-7CF1-4E64-B08A-F6520349A690}'; type { ITarifasDelta } ITarifasDelta = interface(ITarifas) ['{21C7FA08-7CF1-4E64-B08A-F6520349A690}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; { Properties } property OldID : Integer read GetOldIDValue; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; end; { TTarifasBusinessProcessorRules } TTarifasBusinessProcessorRules = class(TDABusinessProcessorRules, ITarifas, ITarifasDelta) private protected { Property getters and setters } function GetIDValue: Integer; virtual; function GetIDIsNull: Boolean; virtual; function GetOldIDValue: Integer; virtual; function GetOldIDIsNull: Boolean; virtual; procedure SetIDValue(const aValue: Integer); virtual; procedure SetIDIsNull(const aValue: Boolean); virtual; function GetDESCRIPCIONValue: String; virtual; function GetDESCRIPCIONIsNull: Boolean; virtual; function GetOldDESCRIPCIONValue: String; virtual; function GetOldDESCRIPCIONIsNull: Boolean; virtual; procedure SetDESCRIPCIONValue(const aValue: String); virtual; procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull; property OldID : Integer read GetOldIDValue; property OldIDIsNull : Boolean read GetOldIDIsNull; property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers, uDAInterfaces; { TTarifasBusinessProcessorRules } constructor TTarifasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); begin inherited; end; destructor TTarifasBusinessProcessorRules.Destroy; begin inherited; end; function TTarifasBusinessProcessorRules.GetIDValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasID]; end; function TTarifasBusinessProcessorRules.GetIDIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasID]); end; function TTarifasBusinessProcessorRules.GetOldIDValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_TarifasID]; end; function TTarifasBusinessProcessorRules.GetOldIDIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TarifasID]); end; procedure TTarifasBusinessProcessorRules.SetIDValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasID] := aValue; end; procedure TTarifasBusinessProcessorRules.SetIDIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasID] := Null; end; function TTarifasBusinessProcessorRules.GetDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasDESCRIPCION]; end; function TTarifasBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasDESCRIPCION]); end; function TTarifasBusinessProcessorRules.GetOldDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_TarifasDESCRIPCION]; end; function TTarifasBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_TarifasDESCRIPCION]); end; procedure TTarifasBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasDESCRIPCION] := aValue; end; procedure TTarifasBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_TarifasDESCRIPCION] := Null; end; initialization RegisterBusinessProcessorRules(RID_TarifasDelta, TTarifasBusinessProcessorRules); end.