unit schEjerciciosClient_Intf; interface uses Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; const { Data table 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_darEjercicioActivo = '{68559186-9ED1-4884-8DF9-41250D6FE517}'; RID_Ejercicios = '{DF458DDE-C3C4-4996-8F9D-48C58CA8BC14}'; { Data table names } nme_darEjercicioActivo = 'darEjercicioActivo'; nme_Ejercicios = 'Ejercicios'; { darEjercicioActivo fields } fld_darEjercicioActivoID = 'ID'; { darEjercicioActivo field indexes } idx_darEjercicioActivoID = 0; { Ejercicios fields } fld_EjerciciosID = 'ID'; fld_EjerciciosID_EMPRESA = 'ID_EMPRESA'; fld_EjerciciosNOMBRE = 'NOMBRE'; fld_EjerciciosFECHA_INICIO = 'FECHA_INICIO'; fld_EjerciciosFECHA_FIN = 'FECHA_FIN'; fld_EjerciciosESTADO = 'ESTADO'; fld_EjerciciosLONG_SUB_CUENTA = 'LONG_SUB_CUENTA'; fld_EjerciciosID_ASIENTO_APERTURA = 'ID_ASIENTO_APERTURA'; fld_EjerciciosID_ASIENTO_PERYGAN = 'ID_ASIENTO_PERYGAN'; fld_EjerciciosID_ASIENTO_CIERRE = 'ID_ASIENTO_CIERRE'; fld_EjerciciosACTIVO = 'ACTIVO'; { Ejercicios field indexes } idx_EjerciciosID = 0; idx_EjerciciosID_EMPRESA = 1; idx_EjerciciosNOMBRE = 2; idx_EjerciciosFECHA_INICIO = 3; idx_EjerciciosFECHA_FIN = 4; idx_EjerciciosESTADO = 5; idx_EjerciciosLONG_SUB_CUENTA = 6; idx_EjerciciosID_ASIENTO_APERTURA = 7; idx_EjerciciosID_ASIENTO_PERYGAN = 8; idx_EjerciciosID_ASIENTO_CIERRE = 9; idx_EjerciciosACTIVO = 10; type { IdarEjercicioActivo } IdarEjercicioActivo = interface(IDAStronglyTypedDataTable) ['{2A3446B7-E843-4491-ABAD-53295D49F75E}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetIDIsNull: Boolean; procedure SetIDIsNull(const aValue: Boolean); { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; end; { TdarEjercicioActivoDataTableRules } TdarEjercicioActivoDataTableRules = class(TIntfObjectDADataTableRules, IdarEjercicioActivo) private protected { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetIDIsNull: Boolean; virtual; procedure SetIDIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; { IEjercicios } IEjercicios = interface(IDAStronglyTypedDataTable) ['{C260D056-8242-4264-BE09-82A833A7EABF}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetIDIsNull: Boolean; procedure SetIDIsNull(const aValue: Boolean); function GetID_EMPRESAValue: Integer; procedure SetID_EMPRESAValue(const aValue: Integer); function GetID_EMPRESAIsNull: Boolean; procedure SetID_EMPRESAIsNull(const aValue: Boolean); function GetNOMBREValue: String; procedure SetNOMBREValue(const aValue: String); function GetNOMBREIsNull: Boolean; procedure SetNOMBREIsNull(const aValue: Boolean); function GetFECHA_INICIOValue: DateTime; procedure SetFECHA_INICIOValue(const aValue: DateTime); function GetFECHA_INICIOIsNull: Boolean; procedure SetFECHA_INICIOIsNull(const aValue: Boolean); function GetFECHA_FINValue: DateTime; procedure SetFECHA_FINValue(const aValue: DateTime); function GetFECHA_FINIsNull: Boolean; procedure SetFECHA_FINIsNull(const aValue: Boolean); function GetESTADOValue: String; procedure SetESTADOValue(const aValue: String); function GetESTADOIsNull: Boolean; procedure SetESTADOIsNull(const aValue: Boolean); function GetLONG_SUB_CUENTAValue: SmallInt; procedure SetLONG_SUB_CUENTAValue(const aValue: SmallInt); function GetLONG_SUB_CUENTAIsNull: Boolean; procedure SetLONG_SUB_CUENTAIsNull(const aValue: Boolean); function GetID_ASIENTO_APERTURAValue: Integer; procedure SetID_ASIENTO_APERTURAValue(const aValue: Integer); function GetID_ASIENTO_APERTURAIsNull: Boolean; procedure SetID_ASIENTO_APERTURAIsNull(const aValue: Boolean); function GetID_ASIENTO_PERYGANValue: Integer; procedure SetID_ASIENTO_PERYGANValue(const aValue: Integer); function GetID_ASIENTO_PERYGANIsNull: Boolean; procedure SetID_ASIENTO_PERYGANIsNull(const aValue: Boolean); function GetID_ASIENTO_CIERREValue: Integer; procedure SetID_ASIENTO_CIERREValue(const aValue: Integer); function GetID_ASIENTO_CIERREIsNull: Boolean; procedure SetID_ASIENTO_CIERREIsNull(const aValue: Boolean); function GetACTIVOValue: SmallInt; procedure SetACTIVOValue(const aValue: SmallInt); function GetACTIVOIsNull: Boolean; procedure SetACTIVOIsNull(const aValue: Boolean); { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull; property FECHA_INICIO: DateTime read GetFECHA_INICIOValue write SetFECHA_INICIOValue; property FECHA_INICIOIsNull: Boolean read GetFECHA_INICIOIsNull write SetFECHA_INICIOIsNull; property FECHA_FIN: DateTime read GetFECHA_FINValue write SetFECHA_FINValue; property FECHA_FINIsNull: Boolean read GetFECHA_FINIsNull write SetFECHA_FINIsNull; property ESTADO: String read GetESTADOValue write SetESTADOValue; property ESTADOIsNull: Boolean read GetESTADOIsNull write SetESTADOIsNull; property LONG_SUB_CUENTA: SmallInt read GetLONG_SUB_CUENTAValue write SetLONG_SUB_CUENTAValue; property LONG_SUB_CUENTAIsNull: Boolean read GetLONG_SUB_CUENTAIsNull write SetLONG_SUB_CUENTAIsNull; property ID_ASIENTO_APERTURA: Integer read GetID_ASIENTO_APERTURAValue write SetID_ASIENTO_APERTURAValue; property ID_ASIENTO_APERTURAIsNull: Boolean read GetID_ASIENTO_APERTURAIsNull write SetID_ASIENTO_APERTURAIsNull; property ID_ASIENTO_PERYGAN: Integer read GetID_ASIENTO_PERYGANValue write SetID_ASIENTO_PERYGANValue; property ID_ASIENTO_PERYGANIsNull: Boolean read GetID_ASIENTO_PERYGANIsNull write SetID_ASIENTO_PERYGANIsNull; property ID_ASIENTO_CIERRE: Integer read GetID_ASIENTO_CIERREValue write SetID_ASIENTO_CIERREValue; property ID_ASIENTO_CIERREIsNull: Boolean read GetID_ASIENTO_CIERREIsNull write SetID_ASIENTO_CIERREIsNull; property ACTIVO: SmallInt read GetACTIVOValue write SetACTIVOValue; property ACTIVOIsNull: Boolean read GetACTIVOIsNull write SetACTIVOIsNull; end; { TEjerciciosDataTableRules } TEjerciciosDataTableRules = class(TIntfObjectDADataTableRules, IEjercicios) private protected { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetIDIsNull: Boolean; virtual; procedure SetIDIsNull(const aValue: Boolean); virtual; function GetID_EMPRESAValue: Integer; virtual; procedure SetID_EMPRESAValue(const aValue: Integer); virtual; function GetID_EMPRESAIsNull: Boolean; virtual; procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual; function GetNOMBREValue: String; virtual; procedure SetNOMBREValue(const aValue: String); virtual; function GetNOMBREIsNull: Boolean; virtual; procedure SetNOMBREIsNull(const aValue: Boolean); virtual; function GetFECHA_INICIOValue: DateTime; virtual; procedure SetFECHA_INICIOValue(const aValue: DateTime); virtual; function GetFECHA_INICIOIsNull: Boolean; virtual; procedure SetFECHA_INICIOIsNull(const aValue: Boolean); virtual; function GetFECHA_FINValue: DateTime; virtual; procedure SetFECHA_FINValue(const aValue: DateTime); virtual; function GetFECHA_FINIsNull: Boolean; virtual; procedure SetFECHA_FINIsNull(const aValue: Boolean); virtual; function GetESTADOValue: String; virtual; procedure SetESTADOValue(const aValue: String); virtual; function GetESTADOIsNull: Boolean; virtual; procedure SetESTADOIsNull(const aValue: Boolean); virtual; function GetLONG_SUB_CUENTAValue: SmallInt; virtual; procedure SetLONG_SUB_CUENTAValue(const aValue: SmallInt); virtual; function GetLONG_SUB_CUENTAIsNull: Boolean; virtual; procedure SetLONG_SUB_CUENTAIsNull(const aValue: Boolean); virtual; function GetID_ASIENTO_APERTURAValue: Integer; virtual; procedure SetID_ASIENTO_APERTURAValue(const aValue: Integer); virtual; function GetID_ASIENTO_APERTURAIsNull: Boolean; virtual; procedure SetID_ASIENTO_APERTURAIsNull(const aValue: Boolean); virtual; function GetID_ASIENTO_PERYGANValue: Integer; virtual; procedure SetID_ASIENTO_PERYGANValue(const aValue: Integer); virtual; function GetID_ASIENTO_PERYGANIsNull: Boolean; virtual; procedure SetID_ASIENTO_PERYGANIsNull(const aValue: Boolean); virtual; function GetID_ASIENTO_CIERREValue: Integer; virtual; procedure SetID_ASIENTO_CIERREValue(const aValue: Integer); virtual; function GetID_ASIENTO_CIERREIsNull: Boolean; virtual; procedure SetID_ASIENTO_CIERREIsNull(const aValue: Boolean); virtual; function GetACTIVOValue: SmallInt; virtual; procedure SetACTIVOValue(const aValue: SmallInt); virtual; function GetACTIVOIsNull: Boolean; virtual; procedure SetACTIVOIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull; property FECHA_INICIO: DateTime read GetFECHA_INICIOValue write SetFECHA_INICIOValue; property FECHA_INICIOIsNull: Boolean read GetFECHA_INICIOIsNull write SetFECHA_INICIOIsNull; property FECHA_FIN: DateTime read GetFECHA_FINValue write SetFECHA_FINValue; property FECHA_FINIsNull: Boolean read GetFECHA_FINIsNull write SetFECHA_FINIsNull; property ESTADO: String read GetESTADOValue write SetESTADOValue; property ESTADOIsNull: Boolean read GetESTADOIsNull write SetESTADOIsNull; property LONG_SUB_CUENTA: SmallInt read GetLONG_SUB_CUENTAValue write SetLONG_SUB_CUENTAValue; property LONG_SUB_CUENTAIsNull: Boolean read GetLONG_SUB_CUENTAIsNull write SetLONG_SUB_CUENTAIsNull; property ID_ASIENTO_APERTURA: Integer read GetID_ASIENTO_APERTURAValue write SetID_ASIENTO_APERTURAValue; property ID_ASIENTO_APERTURAIsNull: Boolean read GetID_ASIENTO_APERTURAIsNull write SetID_ASIENTO_APERTURAIsNull; property ID_ASIENTO_PERYGAN: Integer read GetID_ASIENTO_PERYGANValue write SetID_ASIENTO_PERYGANValue; property ID_ASIENTO_PERYGANIsNull: Boolean read GetID_ASIENTO_PERYGANIsNull write SetID_ASIENTO_PERYGANIsNull; property ID_ASIENTO_CIERRE: Integer read GetID_ASIENTO_CIERREValue write SetID_ASIENTO_CIERREValue; property ID_ASIENTO_CIERREIsNull: Boolean read GetID_ASIENTO_CIERREIsNull write SetID_ASIENTO_CIERREIsNull; property ACTIVO: SmallInt read GetACTIVOValue write SetACTIVOValue; property ACTIVOIsNull: Boolean read GetACTIVOIsNull write SetACTIVOIsNull; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers; { TdarEjercicioActivoDataTableRules } constructor TdarEjercicioActivoDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TdarEjercicioActivoDataTableRules.Destroy; begin inherited; end; function TdarEjercicioActivoDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_darEjercicioActivoID].AsInteger; end; procedure TdarEjercicioActivoDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_darEjercicioActivoID].AsInteger := aValue; end; function TdarEjercicioActivoDataTableRules.GetIDIsNull: boolean; begin result := DataTable.Fields[idx_darEjercicioActivoID].IsNull; end; procedure TdarEjercicioActivoDataTableRules.SetIDIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_darEjercicioActivoID].AsVariant := Null; end; { TEjerciciosDataTableRules } constructor TEjerciciosDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TEjerciciosDataTableRules.Destroy; begin inherited; end; function TEjerciciosDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_EjerciciosID].AsInteger; end; procedure TEjerciciosDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_EjerciciosID].AsInteger := aValue; end; function TEjerciciosDataTableRules.GetIDIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosID].IsNull; end; procedure TEjerciciosDataTableRules.SetIDIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosID].AsVariant := Null; end; function TEjerciciosDataTableRules.GetID_EMPRESAValue: Integer; begin result := DataTable.Fields[idx_EjerciciosID_EMPRESA].AsInteger; end; procedure TEjerciciosDataTableRules.SetID_EMPRESAValue(const aValue: Integer); begin DataTable.Fields[idx_EjerciciosID_EMPRESA].AsInteger := aValue; end; function TEjerciciosDataTableRules.GetID_EMPRESAIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosID_EMPRESA].IsNull; end; procedure TEjerciciosDataTableRules.SetID_EMPRESAIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosID_EMPRESA].AsVariant := Null; end; function TEjerciciosDataTableRules.GetNOMBREValue: String; begin result := DataTable.Fields[idx_EjerciciosNOMBRE].AsString; end; procedure TEjerciciosDataTableRules.SetNOMBREValue(const aValue: String); begin DataTable.Fields[idx_EjerciciosNOMBRE].AsString := aValue; end; function TEjerciciosDataTableRules.GetNOMBREIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosNOMBRE].IsNull; end; procedure TEjerciciosDataTableRules.SetNOMBREIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosNOMBRE].AsVariant := Null; end; function TEjerciciosDataTableRules.GetFECHA_INICIOValue: DateTime; begin result := DataTable.Fields[idx_EjerciciosFECHA_INICIO].AsDateTime; end; procedure TEjerciciosDataTableRules.SetFECHA_INICIOValue(const aValue: DateTime); begin DataTable.Fields[idx_EjerciciosFECHA_INICIO].AsDateTime := aValue; end; function TEjerciciosDataTableRules.GetFECHA_INICIOIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosFECHA_INICIO].IsNull; end; procedure TEjerciciosDataTableRules.SetFECHA_INICIOIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosFECHA_INICIO].AsVariant := Null; end; function TEjerciciosDataTableRules.GetFECHA_FINValue: DateTime; begin result := DataTable.Fields[idx_EjerciciosFECHA_FIN].AsDateTime; end; procedure TEjerciciosDataTableRules.SetFECHA_FINValue(const aValue: DateTime); begin DataTable.Fields[idx_EjerciciosFECHA_FIN].AsDateTime := aValue; end; function TEjerciciosDataTableRules.GetFECHA_FINIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosFECHA_FIN].IsNull; end; procedure TEjerciciosDataTableRules.SetFECHA_FINIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosFECHA_FIN].AsVariant := Null; end; function TEjerciciosDataTableRules.GetESTADOValue: String; begin result := DataTable.Fields[idx_EjerciciosESTADO].AsString; end; procedure TEjerciciosDataTableRules.SetESTADOValue(const aValue: String); begin DataTable.Fields[idx_EjerciciosESTADO].AsString := aValue; end; function TEjerciciosDataTableRules.GetESTADOIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosESTADO].IsNull; end; procedure TEjerciciosDataTableRules.SetESTADOIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosESTADO].AsVariant := Null; end; function TEjerciciosDataTableRules.GetLONG_SUB_CUENTAValue: SmallInt; begin result := DataTable.Fields[idx_EjerciciosLONG_SUB_CUENTA].AsSmallInt; end; procedure TEjerciciosDataTableRules.SetLONG_SUB_CUENTAValue(const aValue: SmallInt); begin DataTable.Fields[idx_EjerciciosLONG_SUB_CUENTA].AsSmallInt := aValue; end; function TEjerciciosDataTableRules.GetLONG_SUB_CUENTAIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosLONG_SUB_CUENTA].IsNull; end; procedure TEjerciciosDataTableRules.SetLONG_SUB_CUENTAIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosLONG_SUB_CUENTA].AsVariant := Null; end; function TEjerciciosDataTableRules.GetID_ASIENTO_APERTURAValue: Integer; begin result := DataTable.Fields[idx_EjerciciosID_ASIENTO_APERTURA].AsInteger; end; procedure TEjerciciosDataTableRules.SetID_ASIENTO_APERTURAValue(const aValue: Integer); begin DataTable.Fields[idx_EjerciciosID_ASIENTO_APERTURA].AsInteger := aValue; end; function TEjerciciosDataTableRules.GetID_ASIENTO_APERTURAIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosID_ASIENTO_APERTURA].IsNull; end; procedure TEjerciciosDataTableRules.SetID_ASIENTO_APERTURAIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosID_ASIENTO_APERTURA].AsVariant := Null; end; function TEjerciciosDataTableRules.GetID_ASIENTO_PERYGANValue: Integer; begin result := DataTable.Fields[idx_EjerciciosID_ASIENTO_PERYGAN].AsInteger; end; procedure TEjerciciosDataTableRules.SetID_ASIENTO_PERYGANValue(const aValue: Integer); begin DataTable.Fields[idx_EjerciciosID_ASIENTO_PERYGAN].AsInteger := aValue; end; function TEjerciciosDataTableRules.GetID_ASIENTO_PERYGANIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosID_ASIENTO_PERYGAN].IsNull; end; procedure TEjerciciosDataTableRules.SetID_ASIENTO_PERYGANIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosID_ASIENTO_PERYGAN].AsVariant := Null; end; function TEjerciciosDataTableRules.GetID_ASIENTO_CIERREValue: Integer; begin result := DataTable.Fields[idx_EjerciciosID_ASIENTO_CIERRE].AsInteger; end; procedure TEjerciciosDataTableRules.SetID_ASIENTO_CIERREValue(const aValue: Integer); begin DataTable.Fields[idx_EjerciciosID_ASIENTO_CIERRE].AsInteger := aValue; end; function TEjerciciosDataTableRules.GetID_ASIENTO_CIERREIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosID_ASIENTO_CIERRE].IsNull; end; procedure TEjerciciosDataTableRules.SetID_ASIENTO_CIERREIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosID_ASIENTO_CIERRE].AsVariant := Null; end; function TEjerciciosDataTableRules.GetACTIVOValue: SmallInt; begin result := DataTable.Fields[idx_EjerciciosACTIVO].AsSmallInt; end; procedure TEjerciciosDataTableRules.SetACTIVOValue(const aValue: SmallInt); begin DataTable.Fields[idx_EjerciciosACTIVO].AsSmallInt := aValue; end; function TEjerciciosDataTableRules.GetACTIVOIsNull: boolean; begin result := DataTable.Fields[idx_EjerciciosACTIVO].IsNull; end; procedure TEjerciciosDataTableRules.SetACTIVOIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EjerciciosACTIVO].AsVariant := Null; end; initialization RegisterDataTableRules(RID_darEjercicioActivo, TdarEjercicioActivoDataTableRules); RegisterDataTableRules(RID_Ejercicios, TEjerciciosDataTableRules); end.