unit schAlmacenesServer_Intf;

interface

uses
  Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, schAlmacenesClient_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_AlmacenesDelta = '{F091F4FA-70AD-40E6-9C14-082208660CFF}';

type
  { IAlmacenesDelta }
  IAlmacenesDelta = interface(IAlmacenes)
  ['{F091F4FA-70AD-40E6-9C14-082208660CFF}']
    { Property getters and setters }
    function GetOldIDValue : Integer;
    function GetOldID_EMPRESAValue : Integer;
    function GetOldNOMBREValue : String;
    function GetOldCALLEValue : String;
    function GetOldPROVINCIAValue : String;
    function GetOldPOBLACIONValue : String;
    function GetOldCODIGO_POSTALValue : String;
    function GetOldTELEFONOValue : String;
    function GetOldMOVILValue : String;
    function GetOldFAXValue : String;
    function GetOldPERSONA_CONTACTOValue : String;
    function GetOldOBSERVACIONESValue : IROStrings;
    function GetOldFECHA_ALTAValue : DateTime;
    function GetOldFECHA_MODIFICACIONValue : DateTime;
    function GetOldUSUARIOValue : String;

    { Properties }
    property OldID : Integer read GetOldIDValue;
    property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
    property OldNOMBRE : String read GetOldNOMBREValue;
    property OldCALLE : String read GetOldCALLEValue;
    property OldPROVINCIA : String read GetOldPROVINCIAValue;
    property OldPOBLACION : String read GetOldPOBLACIONValue;
    property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue;
    property OldTELEFONO : String read GetOldTELEFONOValue;
    property OldMOVIL : String read GetOldMOVILValue;
    property OldFAX : String read GetOldFAXValue;
    property OldPERSONA_CONTACTO : String read GetOldPERSONA_CONTACTOValue;
    property OldOBSERVACIONES : IROStrings read GetOldOBSERVACIONESValue;
    property OldFECHA_ALTA : DateTime read GetOldFECHA_ALTAValue;
    property OldFECHA_MODIFICACION : DateTime read GetOldFECHA_MODIFICACIONValue;
    property OldUSUARIO : String read GetOldUSUARIOValue;
  end;

  { TAlmacenesBusinessProcessorRules }
  TAlmacenesBusinessProcessorRules = class(TDABusinessProcessorRules, IAlmacenes, IAlmacenesDelta)
  private
    f_OBSERVACIONES: IROStrings;
    procedure OBSERVACIONES_OnChange(Sender: TObject);
  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 GetID_EMPRESAValue: Integer; virtual;
    function GetID_EMPRESAIsNull: Boolean; virtual;
    function GetOldID_EMPRESAValue: Integer; virtual;
    function GetOldID_EMPRESAIsNull: Boolean; virtual;
    procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
    procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual;
    function GetNOMBREValue: String; virtual;
    function GetNOMBREIsNull: Boolean; virtual;
    function GetOldNOMBREValue: String; virtual;
    function GetOldNOMBREIsNull: Boolean; virtual;
    procedure SetNOMBREValue(const aValue: String); virtual;
    procedure SetNOMBREIsNull(const aValue: Boolean); virtual;
    function GetCALLEValue: String; virtual;
    function GetCALLEIsNull: Boolean; virtual;
    function GetOldCALLEValue: String; virtual;
    function GetOldCALLEIsNull: Boolean; virtual;
    procedure SetCALLEValue(const aValue: String); virtual;
    procedure SetCALLEIsNull(const aValue: Boolean); virtual;
    function GetPROVINCIAValue: String; virtual;
    function GetPROVINCIAIsNull: Boolean; virtual;
    function GetOldPROVINCIAValue: String; virtual;
    function GetOldPROVINCIAIsNull: Boolean; virtual;
    procedure SetPROVINCIAValue(const aValue: String); virtual;
    procedure SetPROVINCIAIsNull(const aValue: Boolean); virtual;
    function GetPOBLACIONValue: String; virtual;
    function GetPOBLACIONIsNull: Boolean; virtual;
    function GetOldPOBLACIONValue: String; virtual;
    function GetOldPOBLACIONIsNull: Boolean; virtual;
    procedure SetPOBLACIONValue(const aValue: String); virtual;
    procedure SetPOBLACIONIsNull(const aValue: Boolean); virtual;
    function GetCODIGO_POSTALValue: String; virtual;
    function GetCODIGO_POSTALIsNull: Boolean; virtual;
    function GetOldCODIGO_POSTALValue: String; virtual;
    function GetOldCODIGO_POSTALIsNull: Boolean; virtual;
    procedure SetCODIGO_POSTALValue(const aValue: String); virtual;
    procedure SetCODIGO_POSTALIsNull(const aValue: Boolean); virtual;
    function GetTELEFONOValue: String; virtual;
    function GetTELEFONOIsNull: Boolean; virtual;
    function GetOldTELEFONOValue: String; virtual;
    function GetOldTELEFONOIsNull: Boolean; virtual;
    procedure SetTELEFONOValue(const aValue: String); virtual;
    procedure SetTELEFONOIsNull(const aValue: Boolean); virtual;
    function GetMOVILValue: String; virtual;
    function GetMOVILIsNull: Boolean; virtual;
    function GetOldMOVILValue: String; virtual;
    function GetOldMOVILIsNull: Boolean; virtual;
    procedure SetMOVILValue(const aValue: String); virtual;
    procedure SetMOVILIsNull(const aValue: Boolean); virtual;
    function GetFAXValue: String; virtual;
    function GetFAXIsNull: Boolean; virtual;
    function GetOldFAXValue: String; virtual;
    function GetOldFAXIsNull: Boolean; virtual;
    procedure SetFAXValue(const aValue: String); virtual;
    procedure SetFAXIsNull(const aValue: Boolean); virtual;
    function GetPERSONA_CONTACTOValue: String; virtual;
    function GetPERSONA_CONTACTOIsNull: Boolean; virtual;
    function GetOldPERSONA_CONTACTOValue: String; virtual;
    function GetOldPERSONA_CONTACTOIsNull: Boolean; virtual;
    procedure SetPERSONA_CONTACTOValue(const aValue: String); virtual;
    procedure SetPERSONA_CONTACTOIsNull(const aValue: Boolean); virtual;
    function GetOBSERVACIONESValue: IROStrings; virtual;
    function GetOBSERVACIONESIsNull: Boolean; virtual;
    function GetOldOBSERVACIONESValue: IROStrings; virtual;
    function GetOldOBSERVACIONESIsNull: Boolean; virtual;
    procedure SetOBSERVACIONESIsNull(const aValue: Boolean); virtual;
    function GetFECHA_ALTAValue: DateTime; virtual;
    function GetFECHA_ALTAIsNull: Boolean; virtual;
    function GetOldFECHA_ALTAValue: DateTime; virtual;
    function GetOldFECHA_ALTAIsNull: Boolean; virtual;
    procedure SetFECHA_ALTAValue(const aValue: DateTime); virtual;
    procedure SetFECHA_ALTAIsNull(const aValue: Boolean); virtual;
    function GetFECHA_MODIFICACIONValue: DateTime; virtual;
    function GetFECHA_MODIFICACIONIsNull: Boolean; virtual;
    function GetOldFECHA_MODIFICACIONValue: DateTime; virtual;
    function GetOldFECHA_MODIFICACIONIsNull: Boolean; virtual;
    procedure SetFECHA_MODIFICACIONValue(const aValue: DateTime); virtual;
    procedure SetFECHA_MODIFICACIONIsNull(const aValue: Boolean); virtual;
    function GetUSUARIOValue: String; virtual;
    function GetUSUARIOIsNull: Boolean; virtual;
    function GetOldUSUARIOValue: String; virtual;
    function GetOldUSUARIOIsNull: Boolean; virtual;
    procedure SetUSUARIOValue(const aValue: String); virtual;
    procedure SetUSUARIOIsNull(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 ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
    property ID_EMPRESAIsNull : Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
    property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue;
    property OldID_EMPRESAIsNull : Boolean read GetOldID_EMPRESAIsNull;
    property NOMBRE : String read GetNOMBREValue write SetNOMBREValue;
    property NOMBREIsNull : Boolean read GetNOMBREIsNull write SetNOMBREIsNull;
    property OldNOMBRE : String read GetOldNOMBREValue;
    property OldNOMBREIsNull : Boolean read GetOldNOMBREIsNull;
    property CALLE : String read GetCALLEValue write SetCALLEValue;
    property CALLEIsNull : Boolean read GetCALLEIsNull write SetCALLEIsNull;
    property OldCALLE : String read GetOldCALLEValue;
    property OldCALLEIsNull : Boolean read GetOldCALLEIsNull;
    property PROVINCIA : String read GetPROVINCIAValue write SetPROVINCIAValue;
    property PROVINCIAIsNull : Boolean read GetPROVINCIAIsNull write SetPROVINCIAIsNull;
    property OldPROVINCIA : String read GetOldPROVINCIAValue;
    property OldPROVINCIAIsNull : Boolean read GetOldPROVINCIAIsNull;
    property POBLACION : String read GetPOBLACIONValue write SetPOBLACIONValue;
    property POBLACIONIsNull : Boolean read GetPOBLACIONIsNull write SetPOBLACIONIsNull;
    property OldPOBLACION : String read GetOldPOBLACIONValue;
    property OldPOBLACIONIsNull : Boolean read GetOldPOBLACIONIsNull;
    property CODIGO_POSTAL : String read GetCODIGO_POSTALValue write SetCODIGO_POSTALValue;
    property CODIGO_POSTALIsNull : Boolean read GetCODIGO_POSTALIsNull write SetCODIGO_POSTALIsNull;
    property OldCODIGO_POSTAL : String read GetOldCODIGO_POSTALValue;
    property OldCODIGO_POSTALIsNull : Boolean read GetOldCODIGO_POSTALIsNull;
    property TELEFONO : String read GetTELEFONOValue write SetTELEFONOValue;
    property TELEFONOIsNull : Boolean read GetTELEFONOIsNull write SetTELEFONOIsNull;
    property OldTELEFONO : String read GetOldTELEFONOValue;
    property OldTELEFONOIsNull : Boolean read GetOldTELEFONOIsNull;
    property MOVIL : String read GetMOVILValue write SetMOVILValue;
    property MOVILIsNull : Boolean read GetMOVILIsNull write SetMOVILIsNull;
    property OldMOVIL : String read GetOldMOVILValue;
    property OldMOVILIsNull : Boolean read GetOldMOVILIsNull;
    property FAX : String read GetFAXValue write SetFAXValue;
    property FAXIsNull : Boolean read GetFAXIsNull write SetFAXIsNull;
    property OldFAX : String read GetOldFAXValue;
    property OldFAXIsNull : Boolean read GetOldFAXIsNull;
    property PERSONA_CONTACTO : String read GetPERSONA_CONTACTOValue write SetPERSONA_CONTACTOValue;
    property PERSONA_CONTACTOIsNull : Boolean read GetPERSONA_CONTACTOIsNull write SetPERSONA_CONTACTOIsNull;
    property OldPERSONA_CONTACTO : String read GetOldPERSONA_CONTACTOValue;
    property OldPERSONA_CONTACTOIsNull : Boolean read GetOldPERSONA_CONTACTOIsNull;
    property OBSERVACIONES : IROStrings read GetOBSERVACIONESValue;
    property OBSERVACIONESIsNull : Boolean read GetOBSERVACIONESIsNull write SetOBSERVACIONESIsNull;
    property OldOBSERVACIONES : IROStrings read GetOldOBSERVACIONESValue;
    property OldOBSERVACIONESIsNull : Boolean read GetOldOBSERVACIONESIsNull;
    property FECHA_ALTA : DateTime read GetFECHA_ALTAValue write SetFECHA_ALTAValue;
    property FECHA_ALTAIsNull : Boolean read GetFECHA_ALTAIsNull write SetFECHA_ALTAIsNull;
    property OldFECHA_ALTA : DateTime read GetOldFECHA_ALTAValue;
    property OldFECHA_ALTAIsNull : Boolean read GetOldFECHA_ALTAIsNull;
    property FECHA_MODIFICACION : DateTime read GetFECHA_MODIFICACIONValue write SetFECHA_MODIFICACIONValue;
    property FECHA_MODIFICACIONIsNull : Boolean read GetFECHA_MODIFICACIONIsNull write SetFECHA_MODIFICACIONIsNull;
    property OldFECHA_MODIFICACION : DateTime read GetOldFECHA_MODIFICACIONValue;
    property OldFECHA_MODIFICACIONIsNull : Boolean read GetOldFECHA_MODIFICACIONIsNull;
    property USUARIO : String read GetUSUARIOValue write SetUSUARIOValue;
    property USUARIOIsNull : Boolean read GetUSUARIOIsNull write SetUSUARIOIsNull;
    property OldUSUARIO : String read GetOldUSUARIOValue;
    property OldUSUARIOIsNull : Boolean read GetOldUSUARIOIsNull;

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

  end;

implementation

uses
  Variants, uROBinaryHelpers, uDAInterfaces;

{ TAlmacenesBusinessProcessorRules }
constructor TAlmacenesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
var
  StrList: TStringList;
begin
  inherited;

  StrList := TStringList.Create;
  StrList.OnChange := OBSERVACIONES_OnChange;
  f_OBSERVACIONES := NewROStrings(StrList,True);
end;

destructor TAlmacenesBusinessProcessorRules.Destroy;
begin
  inherited;
end;

procedure TAlmacenesBusinessProcessorRules.OBSERVACIONES_OnChange(Sender: TObject);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesOBSERVACIONES] := TStringList(Sender).Text;
end;

function TAlmacenesBusinessProcessorRules.GetIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID];
end;

function TAlmacenesBusinessProcessorRules.GetIDIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID]);
end;

function TAlmacenesBusinessProcessorRules.GetOldIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesID];
end;

function TAlmacenesBusinessProcessorRules.GetOldIDIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesID]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetID_EMPRESAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID_EMPRESA];
end;

function TAlmacenesBusinessProcessorRules.GetID_EMPRESAIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID_EMPRESA]);
end;

function TAlmacenesBusinessProcessorRules.GetOldID_EMPRESAValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesID_EMPRESA];
end;

function TAlmacenesBusinessProcessorRules.GetOldID_EMPRESAIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesID_EMPRESA]);
end;

procedure TAlmacenesBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID_EMPRESA] := aValue;
end;

procedure TAlmacenesBusinessProcessorRules.SetID_EMPRESAIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesID_EMPRESA] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetNOMBREValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesNOMBRE];
end;

function TAlmacenesBusinessProcessorRules.GetNOMBREIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesNOMBRE]);
end;

function TAlmacenesBusinessProcessorRules.GetOldNOMBREValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesNOMBRE];
end;

function TAlmacenesBusinessProcessorRules.GetOldNOMBREIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesNOMBRE]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetNOMBREIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesNOMBRE] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetCALLEValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesCALLE];
end;

function TAlmacenesBusinessProcessorRules.GetCALLEIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesCALLE]);
end;

function TAlmacenesBusinessProcessorRules.GetOldCALLEValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesCALLE];
end;

function TAlmacenesBusinessProcessorRules.GetOldCALLEIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesCALLE]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetCALLEIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesCALLE] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetPROVINCIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPROVINCIA];
end;

function TAlmacenesBusinessProcessorRules.GetPROVINCIAIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPROVINCIA]);
end;

function TAlmacenesBusinessProcessorRules.GetOldPROVINCIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesPROVINCIA];
end;

function TAlmacenesBusinessProcessorRules.GetOldPROVINCIAIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesPROVINCIA]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetPROVINCIAIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPROVINCIA] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetPOBLACIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPOBLACION];
end;

function TAlmacenesBusinessProcessorRules.GetPOBLACIONIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPOBLACION]);
end;

function TAlmacenesBusinessProcessorRules.GetOldPOBLACIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesPOBLACION];
end;

function TAlmacenesBusinessProcessorRules.GetOldPOBLACIONIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesPOBLACION]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetPOBLACIONIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPOBLACION] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetCODIGO_POSTALValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesCODIGO_POSTAL];
end;

function TAlmacenesBusinessProcessorRules.GetCODIGO_POSTALIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesCODIGO_POSTAL]);
end;

function TAlmacenesBusinessProcessorRules.GetOldCODIGO_POSTALValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesCODIGO_POSTAL];
end;

function TAlmacenesBusinessProcessorRules.GetOldCODIGO_POSTALIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesCODIGO_POSTAL]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetCODIGO_POSTALIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesCODIGO_POSTAL] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetTELEFONOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesTELEFONO];
end;

function TAlmacenesBusinessProcessorRules.GetTELEFONOIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesTELEFONO]);
end;

function TAlmacenesBusinessProcessorRules.GetOldTELEFONOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesTELEFONO];
end;

function TAlmacenesBusinessProcessorRules.GetOldTELEFONOIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesTELEFONO]);
end;

procedure TAlmacenesBusinessProcessorRules.SetTELEFONOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesTELEFONO] := aValue;
end;

procedure TAlmacenesBusinessProcessorRules.SetTELEFONOIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesTELEFONO] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetMOVILValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesMOVIL];
end;

function TAlmacenesBusinessProcessorRules.GetMOVILIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesMOVIL]);
end;

function TAlmacenesBusinessProcessorRules.GetOldMOVILValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesMOVIL];
end;

function TAlmacenesBusinessProcessorRules.GetOldMOVILIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesMOVIL]);
end;

procedure TAlmacenesBusinessProcessorRules.SetMOVILValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesMOVIL] := aValue;
end;

procedure TAlmacenesBusinessProcessorRules.SetMOVILIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesMOVIL] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetFAXValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFAX];
end;

function TAlmacenesBusinessProcessorRules.GetFAXIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFAX]);
end;

function TAlmacenesBusinessProcessorRules.GetOldFAXValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesFAX];
end;

function TAlmacenesBusinessProcessorRules.GetOldFAXIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesFAX]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetFAXIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFAX] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetPERSONA_CONTACTOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPERSONA_CONTACTO];
end;

function TAlmacenesBusinessProcessorRules.GetPERSONA_CONTACTOIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPERSONA_CONTACTO]);
end;

function TAlmacenesBusinessProcessorRules.GetOldPERSONA_CONTACTOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesPERSONA_CONTACTO];
end;

function TAlmacenesBusinessProcessorRules.GetOldPERSONA_CONTACTOIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesPERSONA_CONTACTO]);
end;

procedure TAlmacenesBusinessProcessorRules.SetPERSONA_CONTACTOValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPERSONA_CONTACTO] := aValue;
end;

procedure TAlmacenesBusinessProcessorRules.SetPERSONA_CONTACTOIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesPERSONA_CONTACTO] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetOBSERVACIONESValue: IROStrings;
begin
  result := f_OBSERVACIONES;
  result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesOBSERVACIONES];
end;

function TAlmacenesBusinessProcessorRules.GetOBSERVACIONESIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesOBSERVACIONES]);
end;

function TAlmacenesBusinessProcessorRules.GetOldOBSERVACIONESValue: IROStrings;
begin
  result := NewROStrings();
  result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesOBSERVACIONES];
end;

function TAlmacenesBusinessProcessorRules.GetOldOBSERVACIONESIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesOBSERVACIONES]);
end;

procedure TAlmacenesBusinessProcessorRules.SetOBSERVACIONESIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesOBSERVACIONES] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetFECHA_ALTAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFECHA_ALTA];
end;

function TAlmacenesBusinessProcessorRules.GetFECHA_ALTAIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFECHA_ALTA]);
end;

function TAlmacenesBusinessProcessorRules.GetOldFECHA_ALTAValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesFECHA_ALTA];
end;

function TAlmacenesBusinessProcessorRules.GetOldFECHA_ALTAIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesFECHA_ALTA]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetFECHA_ALTAIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFECHA_ALTA] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetFECHA_MODIFICACIONValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFECHA_MODIFICACION];
end;

function TAlmacenesBusinessProcessorRules.GetFECHA_MODIFICACIONIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFECHA_MODIFICACION]);
end;

function TAlmacenesBusinessProcessorRules.GetOldFECHA_MODIFICACIONValue: DateTime;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesFECHA_MODIFICACION];
end;

function TAlmacenesBusinessProcessorRules.GetOldFECHA_MODIFICACIONIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesFECHA_MODIFICACION]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetFECHA_MODIFICACIONIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesFECHA_MODIFICACION] := Null;
end;

function TAlmacenesBusinessProcessorRules.GetUSUARIOValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesUSUARIO];
end;

function TAlmacenesBusinessProcessorRules.GetUSUARIOIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesUSUARIO]);
end;

function TAlmacenesBusinessProcessorRules.GetOldUSUARIOValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesUSUARIO];
end;

function TAlmacenesBusinessProcessorRules.GetOldUSUARIOIsNull: Boolean;
begin
  result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_AlmacenesUSUARIO]);
end;

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

procedure TAlmacenesBusinessProcessorRules.SetUSUARIOIsNull(const aValue: Boolean);
begin
  if aValue then
    BusinessProcessor.CurrentChange.NewValueByName[fld_AlmacenesUSUARIO] := Null;
end;


initialization
  RegisterBusinessProcessorRules(RID_AlmacenesDelta, TAlmacenesBusinessProcessorRules);

end.
