unit schInventarioServer_Intf; interface uses Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schInventarioClient_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_INVENTARIODelta = '{FA283AC8-1AC5-4D13-905D-352FB0617449}'; type { IINVENTARIODelta } IINVENTARIODelta = interface(IINVENTARIO) ['{FA283AC8-1AC5-4D13-905D-352FB0617449}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_ALMACENValue : Integer; function GetOldID_ARTICULOValue : Integer; function GetOldALMACENValue : String; function GetOldID_EMPRESAValue : Integer; function GetOldREFERENCIAValue : String; function GetOldFAMILIAValue : String; function GetOldDESCRIPCIONValue : String; function GetOldPRECIO_NETOValue : Currency; function GetOldREFERENCIA_PROVEEDORValue : String; function GetOldUNIDADES_ALMACENValue : Integer; function GetOldCOSTE_UNIDADESValue : Currency; function GetOldSTOCKValue : Integer; function GetOldRESERVAValue : Integer; function GetOldPENDIENTE_RECEPCIONValue : Integer; function GetOldCANTIDADValue : Integer; function GetOldFECHA_MOVIMIENTOValue : DateTime; function GetOldCAUSAValue : String; function GetOldTIPOValue : String; { Properties } property OldID : Integer read GetOldIDValue; property OldID_ALMACEN : Integer read GetOldID_ALMACENValue; property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue; property OldALMACEN : String read GetOldALMACENValue; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; property OldFAMILIA : String read GetOldFAMILIAValue; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue; property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue; property OldUNIDADES_ALMACEN : Integer read GetOldUNIDADES_ALMACENValue; property OldCOSTE_UNIDADES : Currency read GetOldCOSTE_UNIDADESValue; property OldSTOCK : Integer read GetOldSTOCKValue; property OldRESERVA : Integer read GetOldRESERVAValue; property OldPENDIENTE_RECEPCION : Integer read GetOldPENDIENTE_RECEPCIONValue; property OldCANTIDAD : Integer read GetOldCANTIDADValue; property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue; property OldCAUSA : String read GetOldCAUSAValue; property OldTIPO : String read GetOldTIPOValue; end; { TINVENTARIOBusinessProcessorRules } TINVENTARIOBusinessProcessorRules = class(TDABusinessProcessorRules, IINVENTARIO, IINVENTARIODelta) private protected { Property getters and setters } function GetIDValue: Integer; virtual; function GetOldIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetID_ALMACENValue: Integer; virtual; function GetOldID_ALMACENValue: Integer; virtual; procedure SetID_ALMACENValue(const aValue: Integer); virtual; function GetID_ARTICULOValue: Integer; virtual; function GetOldID_ARTICULOValue: Integer; virtual; procedure SetID_ARTICULOValue(const aValue: Integer); virtual; function GetALMACENValue: String; virtual; function GetOldALMACENValue: String; virtual; procedure SetALMACENValue(const aValue: String); virtual; function GetID_EMPRESAValue: Integer; virtual; function GetOldID_EMPRESAValue: Integer; virtual; procedure SetID_EMPRESAValue(const aValue: Integer); virtual; function GetREFERENCIAValue: String; virtual; function GetOldREFERENCIAValue: String; virtual; procedure SetREFERENCIAValue(const aValue: String); virtual; function GetFAMILIAValue: String; virtual; function GetOldFAMILIAValue: String; virtual; procedure SetFAMILIAValue(const aValue: String); virtual; function GetDESCRIPCIONValue: String; virtual; function GetOldDESCRIPCIONValue: String; virtual; procedure SetDESCRIPCIONValue(const aValue: String); virtual; function GetPRECIO_NETOValue: Currency; virtual; function GetOldPRECIO_NETOValue: Currency; virtual; procedure SetPRECIO_NETOValue(const aValue: Currency); virtual; function GetREFERENCIA_PROVEEDORValue: String; virtual; function GetOldREFERENCIA_PROVEEDORValue: String; virtual; procedure SetREFERENCIA_PROVEEDORValue(const aValue: String); virtual; function GetUNIDADES_ALMACENValue: Integer; virtual; function GetOldUNIDADES_ALMACENValue: Integer; virtual; procedure SetUNIDADES_ALMACENValue(const aValue: Integer); virtual; function GetCOSTE_UNIDADESValue: Currency; virtual; function GetOldCOSTE_UNIDADESValue: Currency; virtual; procedure SetCOSTE_UNIDADESValue(const aValue: Currency); virtual; function GetSTOCKValue: Integer; virtual; function GetOldSTOCKValue: Integer; virtual; procedure SetSTOCKValue(const aValue: Integer); virtual; function GetRESERVAValue: Integer; virtual; function GetOldRESERVAValue: Integer; virtual; procedure SetRESERVAValue(const aValue: Integer); virtual; function GetPENDIENTE_RECEPCIONValue: Integer; virtual; function GetOldPENDIENTE_RECEPCIONValue: Integer; virtual; procedure SetPENDIENTE_RECEPCIONValue(const aValue: Integer); virtual; function GetCANTIDADValue: Integer; virtual; function GetOldCANTIDADValue: Integer; virtual; procedure SetCANTIDADValue(const aValue: Integer); virtual; function GetFECHA_MOVIMIENTOValue: DateTime; virtual; function GetOldFECHA_MOVIMIENTOValue: DateTime; virtual; procedure SetFECHA_MOVIMIENTOValue(const aValue: DateTime); virtual; function GetCAUSAValue: String; virtual; function GetOldCAUSAValue: String; virtual; procedure SetCAUSAValue(const aValue: String); virtual; function GetTIPOValue: String; virtual; function GetOldTIPOValue: String; virtual; procedure SetTIPOValue(const aValue: String); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; property OldID : Integer read GetOldIDValue; property ID_ALMACEN : Integer read GetID_ALMACENValue write SetID_ALMACENValue; property OldID_ALMACEN : Integer read GetOldID_ALMACENValue; property ID_ARTICULO : Integer read GetID_ARTICULOValue write SetID_ARTICULOValue; property OldID_ARTICULO : Integer read GetOldID_ARTICULOValue; property ALMACEN : String read GetALMACENValue write SetALMACENValue; property OldALMACEN : String read GetOldALMACENValue; property ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property REFERENCIA : String read GetREFERENCIAValue write SetREFERENCIAValue; property OldREFERENCIA : String read GetOldREFERENCIAValue; property FAMILIA : String read GetFAMILIAValue write SetFAMILIAValue; property OldFAMILIA : String read GetOldFAMILIAValue; property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; property PRECIO_NETO : Currency read GetPRECIO_NETOValue write SetPRECIO_NETOValue; property OldPRECIO_NETO : Currency read GetOldPRECIO_NETOValue; property REFERENCIA_PROVEEDOR : String read GetREFERENCIA_PROVEEDORValue write SetREFERENCIA_PROVEEDORValue; property OldREFERENCIA_PROVEEDOR : String read GetOldREFERENCIA_PROVEEDORValue; property UNIDADES_ALMACEN : Integer read GetUNIDADES_ALMACENValue write SetUNIDADES_ALMACENValue; property OldUNIDADES_ALMACEN : Integer read GetOldUNIDADES_ALMACENValue; property COSTE_UNIDADES : Currency read GetCOSTE_UNIDADESValue write SetCOSTE_UNIDADESValue; property OldCOSTE_UNIDADES : Currency read GetOldCOSTE_UNIDADESValue; property STOCK : Integer read GetSTOCKValue write SetSTOCKValue; property OldSTOCK : Integer read GetOldSTOCKValue; property RESERVA : Integer read GetRESERVAValue write SetRESERVAValue; property OldRESERVA : Integer read GetOldRESERVAValue; property PENDIENTE_RECEPCION : Integer read GetPENDIENTE_RECEPCIONValue write SetPENDIENTE_RECEPCIONValue; property OldPENDIENTE_RECEPCION : Integer read GetOldPENDIENTE_RECEPCIONValue; property CANTIDAD : Integer read GetCANTIDADValue write SetCANTIDADValue; property OldCANTIDAD : Integer read GetOldCANTIDADValue; property FECHA_MOVIMIENTO : DateTime read GetFECHA_MOVIMIENTOValue write SetFECHA_MOVIMIENTOValue; property OldFECHA_MOVIMIENTO : DateTime read GetOldFECHA_MOVIMIENTOValue; property CAUSA : String read GetCAUSAValue write SetCAUSAValue; property OldCAUSA : String read GetOldCAUSAValue; property TIPO : String read GetTIPOValue write SetTIPOValue; property OldTIPO : String read GetOldTIPOValue; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers; { TINVENTARIOBusinessProcessorRules } constructor TINVENTARIOBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); begin inherited; end; destructor TINVENTARIOBusinessProcessorRules.Destroy; begin inherited; end; function TINVENTARIOBusinessProcessorRules.GetIDValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID]; end; function TINVENTARIOBusinessProcessorRules.GetOldIDValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID]; end; procedure TINVENTARIOBusinessProcessorRules.SetIDValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetID_ALMACENValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ALMACEN]; end; function TINVENTARIOBusinessProcessorRules.GetOldID_ALMACENValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID_ALMACEN]; end; procedure TINVENTARIOBusinessProcessorRules.SetID_ALMACENValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ALMACEN] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetID_ARTICULOValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ARTICULO]; end; function TINVENTARIOBusinessProcessorRules.GetOldID_ARTICULOValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID_ARTICULO]; end; procedure TINVENTARIOBusinessProcessorRules.SetID_ARTICULOValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_ARTICULO] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetALMACENValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOALMACEN]; end; function TINVENTARIOBusinessProcessorRules.GetOldALMACENValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOALMACEN]; end; procedure TINVENTARIOBusinessProcessorRules.SetALMACENValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOALMACEN] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetID_EMPRESAValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_EMPRESA]; end; function TINVENTARIOBusinessProcessorRules.GetOldID_EMPRESAValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOID_EMPRESA]; end; procedure TINVENTARIOBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOID_EMPRESA] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetREFERENCIAValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA]; end; function TINVENTARIOBusinessProcessorRules.GetOldREFERENCIAValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOREFERENCIA]; end; procedure TINVENTARIOBusinessProcessorRules.SetREFERENCIAValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetFAMILIAValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFAMILIA]; end; function TINVENTARIOBusinessProcessorRules.GetOldFAMILIAValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOFAMILIA]; end; procedure TINVENTARIOBusinessProcessorRules.SetFAMILIAValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFAMILIA] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIODESCRIPCION]; end; function TINVENTARIOBusinessProcessorRules.GetOldDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIODESCRIPCION]; end; procedure TINVENTARIOBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIODESCRIPCION] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetPRECIO_NETOValue: Currency; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPRECIO_NETO]; end; function TINVENTARIOBusinessProcessorRules.GetOldPRECIO_NETOValue: Currency; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOPRECIO_NETO]; end; procedure TINVENTARIOBusinessProcessorRules.SetPRECIO_NETOValue(const aValue: Currency); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPRECIO_NETO] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetREFERENCIA_PROVEEDORValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA_PROVEEDOR]; end; function TINVENTARIOBusinessProcessorRules.GetOldREFERENCIA_PROVEEDORValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOREFERENCIA_PROVEEDOR]; end; procedure TINVENTARIOBusinessProcessorRules.SetREFERENCIA_PROVEEDORValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOREFERENCIA_PROVEEDOR] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetUNIDADES_ALMACENValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOUNIDADES_ALMACEN]; end; function TINVENTARIOBusinessProcessorRules.GetOldUNIDADES_ALMACENValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOUNIDADES_ALMACEN]; end; procedure TINVENTARIOBusinessProcessorRules.SetUNIDADES_ALMACENValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOUNIDADES_ALMACEN] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetCOSTE_UNIDADESValue: Currency; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCOSTE_UNIDADES]; end; function TINVENTARIOBusinessProcessorRules.GetOldCOSTE_UNIDADESValue: Currency; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOCOSTE_UNIDADES]; end; procedure TINVENTARIOBusinessProcessorRules.SetCOSTE_UNIDADESValue(const aValue: Currency); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCOSTE_UNIDADES] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetSTOCKValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOSTOCK]; end; function TINVENTARIOBusinessProcessorRules.GetOldSTOCKValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOSTOCK]; end; procedure TINVENTARIOBusinessProcessorRules.SetSTOCKValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOSTOCK] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetRESERVAValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIORESERVA]; end; function TINVENTARIOBusinessProcessorRules.GetOldRESERVAValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIORESERVA]; end; procedure TINVENTARIOBusinessProcessorRules.SetRESERVAValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIORESERVA] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetPENDIENTE_RECEPCIONValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPENDIENTE_RECEPCION]; end; function TINVENTARIOBusinessProcessorRules.GetOldPENDIENTE_RECEPCIONValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOPENDIENTE_RECEPCION]; end; procedure TINVENTARIOBusinessProcessorRules.SetPENDIENTE_RECEPCIONValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOPENDIENTE_RECEPCION] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetCANTIDADValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCANTIDAD]; end; function TINVENTARIOBusinessProcessorRules.GetOldCANTIDADValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOCANTIDAD]; end; procedure TINVENTARIOBusinessProcessorRules.SetCANTIDADValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCANTIDAD] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetFECHA_MOVIMIENTOValue: DateTime; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFECHA_MOVIMIENTO]; end; function TINVENTARIOBusinessProcessorRules.GetOldFECHA_MOVIMIENTOValue: DateTime; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOFECHA_MOVIMIENTO]; end; procedure TINVENTARIOBusinessProcessorRules.SetFECHA_MOVIMIENTOValue(const aValue: DateTime); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOFECHA_MOVIMIENTO] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetCAUSAValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCAUSA]; end; function TINVENTARIOBusinessProcessorRules.GetOldCAUSAValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOCAUSA]; end; procedure TINVENTARIOBusinessProcessorRules.SetCAUSAValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOCAUSA] := aValue; end; function TINVENTARIOBusinessProcessorRules.GetTIPOValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOTIPO]; end; function TINVENTARIOBusinessProcessorRules.GetOldTIPOValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_INVENTARIOTIPO]; end; procedure TINVENTARIOBusinessProcessorRules.SetTIPOValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_INVENTARIOTIPO] := aValue; end; initialization RegisterBusinessProcessorRules(RID_INVENTARIODelta, TINVENTARIOBusinessProcessorRules); end.