unit schEmpresasServer_Intf;

interface

uses
  Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schEmpresasClient_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_EmpresasDelta = '{A084896E-C8E0-485D-8698-7E649B928CEB}';

type
  { IEmpresasDelta }
  IEmpresasDelta = interface(IEmpresas)
  ['{A084896E-C8E0-485D-8698-7E649B928CEB}']
    { Property getters and setters }
    function GetOldIDValue : Integer;
    function GetOldNIF_CIFValue : String;
    function GetOldNOMBREValue : String;
    function GetOldRAZON_SOCIALValue : String;
    function GetOldCALLEValue : String;
    function GetOldPOBLACIONValue : String;
    function GetOldPROVINCIAValue : String;
    function GetOldCODIGO_POSTALValue : String;
    function GetOldTELEFONO_1Value : String;
    function GetOldTELEFONO_2Value : String;
    function GetOldMOVIL_1Value : String;
    function GetOldMOVIL_2Value : String;
    function GetOldFAXValue : String;
    function GetOldEMAIL_1Value : String;
    function GetOldEMAIL_2Value : String;
    function GetOldPAGINA_WEBValue : String;
    function GetOldNOTASValue : IROStrings;
    function GetOldFECHA_ALTAValue : DateTime;
    function GetOldFECHA_MODIFICACIONValue : DateTime;
    function GetOldUSUARIOValue : String;
    function GetOldLOGOTIPOValue : IROStream;
    function GetOldREGISTRO_MERCANTILValue : String;
    function GetOldIVAValue : Float;

    { Properties }
    property OldID : Integer read GetOldIDValue;
    property OldNIF_CIF : String read GetOldNIF_CIFValue;
    property OldNOMBRE : String read GetOldNOMBREValue;
    property OldRAZON_SOCIAL : String read GetOldRAZON_SOCIALValue;
    property OldCALLE : String read GetOldCALLEValue;
    property OldPOBLACION : String read GetOldPOBLACIONValue;
    property OldPROVINCIA : String read GetOldPROVINCIAValue;
    property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue;
    property OldTELEFONO_1 : String read GetOldTELEFONO_1Value;
    property OldTELEFONO_2 : String read GetOldTELEFONO_2Value;
    property OldMOVIL_1 : String read GetOldMOVIL_1Value;
    property OldMOVIL_2 : String read GetOldMOVIL_2Value;
    property OldFAX : String read GetOldFAXValue;
    property OldEMAIL_1 : String read GetOldEMAIL_1Value;
    property OldEMAIL_2 : String read GetOldEMAIL_2Value;
    property OldPAGINA_WEB : String read GetOldPAGINA_WEBValue;
    property OldNOTAS : IROStrings read GetOldNOTASValue;
    property OldFECHA_ALTA : DateTime read GetOldFECHA_ALTAValue;
    property OldFECHA_MODIFICACION : DateTime read GetOldFECHA_MODIFICACIONValue;
    property OldUSUARIO : String read GetOldUSUARIOValue;
    property OldLOGOTIPO : IROStream read GetOldLOGOTIPOValue;
    property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue;
    property OldIVA : Float read GetOldIVAValue;
  end;

  { TEmpresasBusinessProcessorRules }
  TEmpresasBusinessProcessorRules = class(TDABusinessProcessorRules, IEmpresas, IEmpresasDelta)
  private
  protected
    { Property getters and setters }
    function GetIDValue: Integer; virtual;
    function GetOldIDValue: Integer; virtual;
    procedure SetIDValue(const aValue: Integer); virtual;
    function GetNIF_CIFValue: String; virtual;
    function GetOldNIF_CIFValue: String; virtual;
    procedure SetNIF_CIFValue(const aValue: String); virtual;
    function GetNOMBREValue: String; virtual;
    function GetOldNOMBREValue: String; virtual;
    procedure SetNOMBREValue(const aValue: String); virtual;
    function GetRAZON_SOCIALValue: String; virtual;
    function GetOldRAZON_SOCIALValue: String; virtual;
    procedure SetRAZON_SOCIALValue(const aValue: String); virtual;
    function GetCALLEValue: String; virtual;
    function GetOldCALLEValue: String; virtual;
    procedure SetCALLEValue(const aValue: String); virtual;
    function GetPOBLACIONValue: String; virtual;
    function GetOldPOBLACIONValue: String; virtual;
    procedure SetPOBLACIONValue(const aValue: String); virtual;
    function GetPROVINCIAValue: String; virtual;
    function GetOldPROVINCIAValue: String; virtual;
    procedure SetPROVINCIAValue(const aValue: String); virtual;
    function GetCODIGO_POSTALValue: String; virtual;
    function GetOldCODIGO_POSTALValue: String; virtual;
    procedure SetCODIGO_POSTALValue(const aValue: String); virtual;
    function GetTELEFONO_1Value: String; virtual;
    function GetOldTELEFONO_1Value: String; virtual;
    procedure SetTELEFONO_1Value(const aValue: String); virtual;
    function GetTELEFONO_2Value: String; virtual;
    function GetOldTELEFONO_2Value: String; virtual;
    procedure SetTELEFONO_2Value(const aValue: String); virtual;
    function GetMOVIL_1Value: String; virtual;
    function GetOldMOVIL_1Value: String; virtual;
    procedure SetMOVIL_1Value(const aValue: String); virtual;
    function GetMOVIL_2Value: String; virtual;
    function GetOldMOVIL_2Value: String; virtual;
    procedure SetMOVIL_2Value(const aValue: String); virtual;
    function GetFAXValue: String; virtual;
    function GetOldFAXValue: String; virtual;
    procedure SetFAXValue(const aValue: String); virtual;
    function GetEMAIL_1Value: String; virtual;
    function GetOldEMAIL_1Value: String; virtual;
    procedure SetEMAIL_1Value(const aValue: String); virtual;
    function GetEMAIL_2Value: String; virtual;
    function GetOldEMAIL_2Value: String; virtual;
    procedure SetEMAIL_2Value(const aValue: String); virtual;
    function GetPAGINA_WEBValue: String; virtual;
    function GetOldPAGINA_WEBValue: String; virtual;
    procedure SetPAGINA_WEBValue(const aValue: String); virtual;
    function GetNOTASValue: IROStrings; virtual;
    function GetOldNOTASValue: IROStrings; virtual;
    procedure SetNOTASValue(const aValue: IROStrings); virtual;
    function GetFECHA_ALTAValue: DateTime; virtual;
    function GetOldFECHA_ALTAValue: DateTime; virtual;
    procedure SetFECHA_ALTAValue(const aValue: DateTime); virtual;
    function GetFECHA_MODIFICACIONValue: DateTime; virtual;
    function GetOldFECHA_MODIFICACIONValue: DateTime; virtual;
    procedure SetFECHA_MODIFICACIONValue(const aValue: DateTime); virtual;
    function GetUSUARIOValue: String; virtual;
    function GetOldUSUARIOValue: String; virtual;
    procedure SetUSUARIOValue(const aValue: String); virtual;
    function GetLOGOTIPOValue: IROStream; virtual;
    function GetOldLOGOTIPOValue: IROStream; virtual;
    procedure SetLOGOTIPOValue(const aValue: IROStream); virtual;
    function GetREGISTRO_MERCANTILValue: String; virtual;
    function GetOldREGISTRO_MERCANTILValue: String; virtual;
    procedure SetREGISTRO_MERCANTILValue(const aValue: String); virtual;
    function GetIVAValue: Float; virtual;
    function GetOldIVAValue: Float; virtual;
    procedure SetIVAValue(const aValue: Float); virtual;

    { Properties }
    property ID : Integer read GetIDValue write SetIDValue;
    property OldID : Integer read GetOldIDValue;
    property NIF_CIF : String read GetNIF_CIFValue write SetNIF_CIFValue;
    property OldNIF_CIF : String read GetOldNIF_CIFValue;
    property NOMBRE : String read GetNOMBREValue write SetNOMBREValue;
    property OldNOMBRE : String read GetOldNOMBREValue;
    property RAZON_SOCIAL : String read GetRAZON_SOCIALValue write SetRAZON_SOCIALValue;
    property OldRAZON_SOCIAL : String read GetOldRAZON_SOCIALValue;
    property CALLE : String read GetCALLEValue write SetCALLEValue;
    property OldCALLE : String read GetOldCALLEValue;
    property POBLACION : String read GetPOBLACIONValue write SetPOBLACIONValue;
    property OldPOBLACION : String read GetOldPOBLACIONValue;
    property PROVINCIA : String read GetPROVINCIAValue write SetPROVINCIAValue;
    property OldPROVINCIA : String read GetOldPROVINCIAValue;
    property CODIGO_POSTAL : String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue;
    property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue;
    property TELEFONO_1 : String read GetTELEFONO_1Value write SetTELEFONO_1Value;
    property OldTELEFONO_1 : String read GetOldTELEFONO_1Value;
    property TELEFONO_2 : String read GetTELEFONO_2Value write SetTELEFONO_2Value;
    property OldTELEFONO_2 : String read GetOldTELEFONO_2Value;
    property MOVIL_1 : String read GetMOVIL_1Value write SetMOVIL_1Value;
    property OldMOVIL_1 : String read GetOldMOVIL_1Value;
    property MOVIL_2 : String read GetMOVIL_2Value write SetMOVIL_2Value;
    property OldMOVIL_2 : String read GetOldMOVIL_2Value;
    property FAX : String read GetFAXValue write SetFAXValue;
    property OldFAX : String read GetOldFAXValue;
    property EMAIL_1 : String read GetEMAIL_1Value write SetEMAIL_1Value;
    property OldEMAIL_1 : String read GetOldEMAIL_1Value;
    property EMAIL_2 : String read GetEMAIL_2Value write SetEMAIL_2Value;
    property OldEMAIL_2 : String read GetOldEMAIL_2Value;
    property PAGINA_WEB : String read GetPAGINA_WEBValue write SetPAGINA_WEBValue;
    property OldPAGINA_WEB : String read GetOldPAGINA_WEBValue;
    property NOTAS : IROStrings read GetNOTASValue write SetNOTASValue;
    property OldNOTAS : IROStrings read GetOldNOTASValue;
    property FECHA_ALTA : DateTime read GetFECHA_ALTAValue write SetFECHA_ALTAValue;
    property OldFECHA_ALTA : DateTime read GetOldFECHA_ALTAValue;
    property FECHA_MODIFICACION : DateTime read GetFECHA_MODIFICACIONValue write SetFECHA_MODIFICACIONValue;
    property OldFECHA_MODIFICACION : DateTime read GetOldFECHA_MODIFICACIONValue;
    property USUARIO : String read GetUSUARIOValue write SetUSUARIOValue;
    property OldUSUARIO : String read GetOldUSUARIOValue;
    property LOGOTIPO : IROStream read GetLOGOTIPOValue write SetLOGOTIPOValue;
    property OldLOGOTIPO : IROStream read GetOldLOGOTIPOValue;
    property REGISTRO_MERCANTIL : String read GetREGISTRO_MERCANTILValue write SetREGISTRO_MERCANTILValue;
    property OldREGISTRO_MERCANTIL : String read GetOldREGISTRO_MERCANTILValue;
    property IVA : Float read GetIVAValue write SetIVAValue;
    property OldIVA : Float read GetOldIVAValue;

  public
    constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
    destructor Destroy; override;

  end;

implementation

uses
  Variants, uROBinaryHelpers;

{ TEmpresasBusinessProcessorRules }
constructor TEmpresasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
  inherited;
end;

destructor TEmpresasBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TEmpresasBusinessProcessorRules.GetIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID];
end;

function TEmpresasBusinessProcessorRules.GetOldIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasID];
end;

procedure TEmpresasBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasID] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetNIF_CIFValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNIF_CIF];
end;

function TEmpresasBusinessProcessorRules.GetOldNIF_CIFValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasNIF_CIF];
end;

procedure TEmpresasBusinessProcessorRules.SetNIF_CIFValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNIF_CIF] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetNOMBREValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNOMBRE];
end;

function TEmpresasBusinessProcessorRules.GetOldNOMBREValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasNOMBRE];
end;

procedure TEmpresasBusinessProcessorRules.SetNOMBREValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNOMBRE] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetRAZON_SOCIALValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasRAZON_SOCIAL];
end;

function TEmpresasBusinessProcessorRules.GetOldRAZON_SOCIALValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasRAZON_SOCIAL];
end;

procedure TEmpresasBusinessProcessorRules.SetRAZON_SOCIALValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasRAZON_SOCIAL] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetCALLEValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasCALLE];
end;

function TEmpresasBusinessProcessorRules.GetOldCALLEValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasCALLE];
end;

procedure TEmpresasBusinessProcessorRules.SetCALLEValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasCALLE] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetPOBLACIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPOBLACION];
end;

function TEmpresasBusinessProcessorRules.GetOldPOBLACIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPOBLACION];
end;

procedure TEmpresasBusinessProcessorRules.SetPOBLACIONValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPOBLACION] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetPROVINCIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPROVINCIA];
end;

function TEmpresasBusinessProcessorRules.GetOldPROVINCIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPROVINCIA];
end;

procedure TEmpresasBusinessProcessorRules.SetPROVINCIAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPROVINCIA] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetCODIGO_POSTALValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasCODIGO_POSTAL];
end;

function TEmpresasBusinessProcessorRules.GetOldCODIGO_POSTALValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasCODIGO_POSTAL];
end;

procedure TEmpresasBusinessProcessorRules.SetCODIGO_POSTALValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasCODIGO_POSTAL] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetTELEFONO_1Value: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasTELEFONO_1];
end;

function TEmpresasBusinessProcessorRules.GetOldTELEFONO_1Value: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasTELEFONO_1];
end;

procedure TEmpresasBusinessProcessorRules.SetTELEFONO_1Value(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasTELEFONO_1] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetTELEFONO_2Value: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasTELEFONO_2];
end;

function TEmpresasBusinessProcessorRules.GetOldTELEFONO_2Value: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasTELEFONO_2];
end;

procedure TEmpresasBusinessProcessorRules.SetTELEFONO_2Value(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasTELEFONO_2] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetMOVIL_1Value: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasMOVIL_1];
end;

function TEmpresasBusinessProcessorRules.GetOldMOVIL_1Value: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasMOVIL_1];
end;

procedure TEmpresasBusinessProcessorRules.SetMOVIL_1Value(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasMOVIL_1] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetMOVIL_2Value: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasMOVIL_2];
end;

function TEmpresasBusinessProcessorRules.GetOldMOVIL_2Value: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasMOVIL_2];
end;

procedure TEmpresasBusinessProcessorRules.SetMOVIL_2Value(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasMOVIL_2] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetFAXValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasFAX];
end;

function TEmpresasBusinessProcessorRules.GetOldFAXValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasFAX];
end;

procedure TEmpresasBusinessProcessorRules.SetFAXValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasFAX] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetEMAIL_1Value: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasEMAIL_1];
end;

function TEmpresasBusinessProcessorRules.GetOldEMAIL_1Value: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasEMAIL_1];
end;

procedure TEmpresasBusinessProcessorRules.SetEMAIL_1Value(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasEMAIL_1] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetEMAIL_2Value: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasEMAIL_2];
end;

function TEmpresasBusinessProcessorRules.GetOldEMAIL_2Value: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasEMAIL_2];
end;

procedure TEmpresasBusinessProcessorRules.SetEMAIL_2Value(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasEMAIL_2] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetPAGINA_WEBValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPAGINA_WEB];
end;

function TEmpresasBusinessProcessorRules.GetOldPAGINA_WEBValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasPAGINA_WEB];
end;

procedure TEmpresasBusinessProcessorRules.SetPAGINA_WEBValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasPAGINA_WEB] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetNOTASValue: IROStrings;
begin
  result := NewROStrings();
  result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNOTAS];
end;

function TEmpresasBusinessProcessorRules.GetOldNOTASValue: IROStrings;
begin
  result := NewROStrings();
  result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasNOTAS];
end;

procedure TEmpresasBusinessProcessorRules.SetNOTASValue(const aValue: IROStrings);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasNOTAS] := aValue.Text;
end;

function TEmpresasBusinessProcessorRules.GetFECHA_ALTAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasFECHA_ALTA];
end;

function TEmpresasBusinessProcessorRules.GetOldFECHA_ALTAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasFECHA_ALTA];
end;

procedure TEmpresasBusinessProcessorRules.SetFECHA_ALTAValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasFECHA_ALTA] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetFECHA_MODIFICACIONValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasFECHA_MODIFICACION];
end;

function TEmpresasBusinessProcessorRules.GetOldFECHA_MODIFICACIONValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasFECHA_MODIFICACION];
end;

procedure TEmpresasBusinessProcessorRules.SetFECHA_MODIFICACIONValue(const aValue: DateTime);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasFECHA_MODIFICACION] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetUSUARIOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasUSUARIO];
end;

function TEmpresasBusinessProcessorRules.GetOldUSUARIOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasUSUARIO];
end;

procedure TEmpresasBusinessProcessorRules.SetUSUARIOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasUSUARIO] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetLOGOTIPOValue: IROStream;
begin
  result := NewROStream();
  WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasLOGOTIPO], result.Stream);
end;

function TEmpresasBusinessProcessorRules.GetOldLOGOTIPOValue: IROStream;
begin
  result := NewROStream();
  WriteVariantBinaryToBinary(BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasLOGOTIPO], result.Stream);
end;

procedure TEmpresasBusinessProcessorRules.SetLOGOTIPOValue(const aValue: IROStream);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasLOGOTIPO] := VariantBinaryFromBinary(aValue.Stream);
end;

function TEmpresasBusinessProcessorRules.GetREGISTRO_MERCANTILValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasREGISTRO_MERCANTIL];
end;

function TEmpresasBusinessProcessorRules.GetOldREGISTRO_MERCANTILValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasREGISTRO_MERCANTIL];
end;

procedure TEmpresasBusinessProcessorRules.SetREGISTRO_MERCANTILValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasREGISTRO_MERCANTIL] := aValue;
end;

function TEmpresasBusinessProcessorRules.GetIVAValue: Float;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA];
end;

function TEmpresasBusinessProcessorRules.GetOldIVAValue: Float;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_EmpresasIVA];
end;

procedure TEmpresasBusinessProcessorRules.SetIVAValue(const aValue: Float);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_EmpresasIVA] := aValue;
end;


initialization
  RegisterBusinessProcessorRules(RID_EmpresasDelta, TEmpresasBusinessProcessorRules);

end.
