unit schBalancesClient_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_Balances = '{99F0A123-F6B9-45A8-AC24-DD0A2C8855F1}'; { Data table names } nme_Balances = 'Balances'; { Balances fields } fld_BalancesID = 'ID'; fld_BalancesREF_BALANCE = 'REF_BALANCE'; fld_BalancesNATURALEZA = 'NATURALEZA'; fld_BalancesNIVEL1 = 'NIVEL1'; fld_BalancesDESCRIPCION1 = 'DESCRIPCION1'; fld_BalancesNIVEL2 = 'NIVEL2'; fld_BalancesDESCRIPCION2 = 'DESCRIPCION2'; fld_BalancesNIVEL3 = 'NIVEL3'; fld_BalancesDESCRIPCION3 = 'DESCRIPCION3'; { Balances field indexes } idx_BalancesID = 0; idx_BalancesREF_BALANCE = 1; idx_BalancesNATURALEZA = 2; idx_BalancesNIVEL1 = 3; idx_BalancesDESCRIPCION1 = 4; idx_BalancesNIVEL2 = 5; idx_BalancesDESCRIPCION2 = 6; idx_BalancesNIVEL3 = 7; idx_BalancesDESCRIPCION3 = 8; type { IBalances } IBalances = interface(IDAStronglyTypedDataTable) ['{3B9C8F08-A9DB-48FF-94B0-491F9887D89D}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetIDIsNull: Boolean; procedure SetIDIsNull(const aValue: Boolean); function GetREF_BALANCEValue: String; procedure SetREF_BALANCEValue(const aValue: String); function GetREF_BALANCEIsNull: Boolean; procedure SetREF_BALANCEIsNull(const aValue: Boolean); function GetNATURALEZAValue: String; procedure SetNATURALEZAValue(const aValue: String); function GetNATURALEZAIsNull: Boolean; procedure SetNATURALEZAIsNull(const aValue: Boolean); function GetNIVEL1Value: String; procedure SetNIVEL1Value(const aValue: String); function GetNIVEL1IsNull: Boolean; procedure SetNIVEL1IsNull(const aValue: Boolean); function GetDESCRIPCION1Value: String; procedure SetDESCRIPCION1Value(const aValue: String); function GetDESCRIPCION1IsNull: Boolean; procedure SetDESCRIPCION1IsNull(const aValue: Boolean); function GetNIVEL2Value: String; procedure SetNIVEL2Value(const aValue: String); function GetNIVEL2IsNull: Boolean; procedure SetNIVEL2IsNull(const aValue: Boolean); function GetDESCRIPCION2Value: String; procedure SetDESCRIPCION2Value(const aValue: String); function GetDESCRIPCION2IsNull: Boolean; procedure SetDESCRIPCION2IsNull(const aValue: Boolean); function GetNIVEL3Value: String; procedure SetNIVEL3Value(const aValue: String); function GetNIVEL3IsNull: Boolean; procedure SetNIVEL3IsNull(const aValue: Boolean); function GetDESCRIPCION3Value: String; procedure SetDESCRIPCION3Value(const aValue: String); function GetDESCRIPCION3IsNull: Boolean; procedure SetDESCRIPCION3IsNull(const aValue: Boolean); { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property REF_BALANCE: String read GetREF_BALANCEValue write SetREF_BALANCEValue; property REF_BALANCEIsNull: Boolean read GetREF_BALANCEIsNull write SetREF_BALANCEIsNull; property NATURALEZA: String read GetNATURALEZAValue write SetNATURALEZAValue; property NATURALEZAIsNull: Boolean read GetNATURALEZAIsNull write SetNATURALEZAIsNull; property NIVEL1: String read GetNIVEL1Value write SetNIVEL1Value; property NIVEL1IsNull: Boolean read GetNIVEL1IsNull write SetNIVEL1IsNull; property DESCRIPCION1: String read GetDESCRIPCION1Value write SetDESCRIPCION1Value; property DESCRIPCION1IsNull: Boolean read GetDESCRIPCION1IsNull write SetDESCRIPCION1IsNull; property NIVEL2: String read GetNIVEL2Value write SetNIVEL2Value; property NIVEL2IsNull: Boolean read GetNIVEL2IsNull write SetNIVEL2IsNull; property DESCRIPCION2: String read GetDESCRIPCION2Value write SetDESCRIPCION2Value; property DESCRIPCION2IsNull: Boolean read GetDESCRIPCION2IsNull write SetDESCRIPCION2IsNull; property NIVEL3: String read GetNIVEL3Value write SetNIVEL3Value; property NIVEL3IsNull: Boolean read GetNIVEL3IsNull write SetNIVEL3IsNull; property DESCRIPCION3: String read GetDESCRIPCION3Value write SetDESCRIPCION3Value; property DESCRIPCION3IsNull: Boolean read GetDESCRIPCION3IsNull write SetDESCRIPCION3IsNull; end; { TBalancesDataTableRules } TBalancesDataTableRules = class(TIntfObjectDADataTableRules, IBalances) 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 GetREF_BALANCEValue: String; virtual; procedure SetREF_BALANCEValue(const aValue: String); virtual; function GetREF_BALANCEIsNull: Boolean; virtual; procedure SetREF_BALANCEIsNull(const aValue: Boolean); virtual; function GetNATURALEZAValue: String; virtual; procedure SetNATURALEZAValue(const aValue: String); virtual; function GetNATURALEZAIsNull: Boolean; virtual; procedure SetNATURALEZAIsNull(const aValue: Boolean); virtual; function GetNIVEL1Value: String; virtual; procedure SetNIVEL1Value(const aValue: String); virtual; function GetNIVEL1IsNull: Boolean; virtual; procedure SetNIVEL1IsNull(const aValue: Boolean); virtual; function GetDESCRIPCION1Value: String; virtual; procedure SetDESCRIPCION1Value(const aValue: String); virtual; function GetDESCRIPCION1IsNull: Boolean; virtual; procedure SetDESCRIPCION1IsNull(const aValue: Boolean); virtual; function GetNIVEL2Value: String; virtual; procedure SetNIVEL2Value(const aValue: String); virtual; function GetNIVEL2IsNull: Boolean; virtual; procedure SetNIVEL2IsNull(const aValue: Boolean); virtual; function GetDESCRIPCION2Value: String; virtual; procedure SetDESCRIPCION2Value(const aValue: String); virtual; function GetDESCRIPCION2IsNull: Boolean; virtual; procedure SetDESCRIPCION2IsNull(const aValue: Boolean); virtual; function GetNIVEL3Value: String; virtual; procedure SetNIVEL3Value(const aValue: String); virtual; function GetNIVEL3IsNull: Boolean; virtual; procedure SetNIVEL3IsNull(const aValue: Boolean); virtual; function GetDESCRIPCION3Value: String; virtual; procedure SetDESCRIPCION3Value(const aValue: String); virtual; function GetDESCRIPCION3IsNull: Boolean; virtual; procedure SetDESCRIPCION3IsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property REF_BALANCE: String read GetREF_BALANCEValue write SetREF_BALANCEValue; property REF_BALANCEIsNull: Boolean read GetREF_BALANCEIsNull write SetREF_BALANCEIsNull; property NATURALEZA: String read GetNATURALEZAValue write SetNATURALEZAValue; property NATURALEZAIsNull: Boolean read GetNATURALEZAIsNull write SetNATURALEZAIsNull; property NIVEL1: String read GetNIVEL1Value write SetNIVEL1Value; property NIVEL1IsNull: Boolean read GetNIVEL1IsNull write SetNIVEL1IsNull; property DESCRIPCION1: String read GetDESCRIPCION1Value write SetDESCRIPCION1Value; property DESCRIPCION1IsNull: Boolean read GetDESCRIPCION1IsNull write SetDESCRIPCION1IsNull; property NIVEL2: String read GetNIVEL2Value write SetNIVEL2Value; property NIVEL2IsNull: Boolean read GetNIVEL2IsNull write SetNIVEL2IsNull; property DESCRIPCION2: String read GetDESCRIPCION2Value write SetDESCRIPCION2Value; property DESCRIPCION2IsNull: Boolean read GetDESCRIPCION2IsNull write SetDESCRIPCION2IsNull; property NIVEL3: String read GetNIVEL3Value write SetNIVEL3Value; property NIVEL3IsNull: Boolean read GetNIVEL3IsNull write SetNIVEL3IsNull; property DESCRIPCION3: String read GetDESCRIPCION3Value write SetDESCRIPCION3Value; property DESCRIPCION3IsNull: Boolean read GetDESCRIPCION3IsNull write SetDESCRIPCION3IsNull; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers; { TBalancesDataTableRules } constructor TBalancesDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TBalancesDataTableRules.Destroy; begin inherited; end; function TBalancesDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_BalancesID].AsInteger; end; procedure TBalancesDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_BalancesID].AsInteger := aValue; end; function TBalancesDataTableRules.GetIDIsNull: boolean; begin result := DataTable.Fields[idx_BalancesID].IsNull; end; procedure TBalancesDataTableRules.SetIDIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesID].AsVariant := Null; end; function TBalancesDataTableRules.GetREF_BALANCEValue: String; begin result := DataTable.Fields[idx_BalancesREF_BALANCE].AsString; end; procedure TBalancesDataTableRules.SetREF_BALANCEValue(const aValue: String); begin DataTable.Fields[idx_BalancesREF_BALANCE].AsString := aValue; end; function TBalancesDataTableRules.GetREF_BALANCEIsNull: boolean; begin result := DataTable.Fields[idx_BalancesREF_BALANCE].IsNull; end; procedure TBalancesDataTableRules.SetREF_BALANCEIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesREF_BALANCE].AsVariant := Null; end; function TBalancesDataTableRules.GetNATURALEZAValue: String; begin result := DataTable.Fields[idx_BalancesNATURALEZA].AsString; end; procedure TBalancesDataTableRules.SetNATURALEZAValue(const aValue: String); begin DataTable.Fields[idx_BalancesNATURALEZA].AsString := aValue; end; function TBalancesDataTableRules.GetNATURALEZAIsNull: boolean; begin result := DataTable.Fields[idx_BalancesNATURALEZA].IsNull; end; procedure TBalancesDataTableRules.SetNATURALEZAIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesNATURALEZA].AsVariant := Null; end; function TBalancesDataTableRules.GetNIVEL1Value: String; begin result := DataTable.Fields[idx_BalancesNIVEL1].AsString; end; procedure TBalancesDataTableRules.SetNIVEL1Value(const aValue: String); begin DataTable.Fields[idx_BalancesNIVEL1].AsString := aValue; end; function TBalancesDataTableRules.GetNIVEL1IsNull: boolean; begin result := DataTable.Fields[idx_BalancesNIVEL1].IsNull; end; procedure TBalancesDataTableRules.SetNIVEL1IsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesNIVEL1].AsVariant := Null; end; function TBalancesDataTableRules.GetDESCRIPCION1Value: String; begin result := DataTable.Fields[idx_BalancesDESCRIPCION1].AsString; end; procedure TBalancesDataTableRules.SetDESCRIPCION1Value(const aValue: String); begin DataTable.Fields[idx_BalancesDESCRIPCION1].AsString := aValue; end; function TBalancesDataTableRules.GetDESCRIPCION1IsNull: boolean; begin result := DataTable.Fields[idx_BalancesDESCRIPCION1].IsNull; end; procedure TBalancesDataTableRules.SetDESCRIPCION1IsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesDESCRIPCION1].AsVariant := Null; end; function TBalancesDataTableRules.GetNIVEL2Value: String; begin result := DataTable.Fields[idx_BalancesNIVEL2].AsString; end; procedure TBalancesDataTableRules.SetNIVEL2Value(const aValue: String); begin DataTable.Fields[idx_BalancesNIVEL2].AsString := aValue; end; function TBalancesDataTableRules.GetNIVEL2IsNull: boolean; begin result := DataTable.Fields[idx_BalancesNIVEL2].IsNull; end; procedure TBalancesDataTableRules.SetNIVEL2IsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesNIVEL2].AsVariant := Null; end; function TBalancesDataTableRules.GetDESCRIPCION2Value: String; begin result := DataTable.Fields[idx_BalancesDESCRIPCION2].AsString; end; procedure TBalancesDataTableRules.SetDESCRIPCION2Value(const aValue: String); begin DataTable.Fields[idx_BalancesDESCRIPCION2].AsString := aValue; end; function TBalancesDataTableRules.GetDESCRIPCION2IsNull: boolean; begin result := DataTable.Fields[idx_BalancesDESCRIPCION2].IsNull; end; procedure TBalancesDataTableRules.SetDESCRIPCION2IsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesDESCRIPCION2].AsVariant := Null; end; function TBalancesDataTableRules.GetNIVEL3Value: String; begin result := DataTable.Fields[idx_BalancesNIVEL3].AsString; end; procedure TBalancesDataTableRules.SetNIVEL3Value(const aValue: String); begin DataTable.Fields[idx_BalancesNIVEL3].AsString := aValue; end; function TBalancesDataTableRules.GetNIVEL3IsNull: boolean; begin result := DataTable.Fields[idx_BalancesNIVEL3].IsNull; end; procedure TBalancesDataTableRules.SetNIVEL3IsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesNIVEL3].AsVariant := Null; end; function TBalancesDataTableRules.GetDESCRIPCION3Value: String; begin result := DataTable.Fields[idx_BalancesDESCRIPCION3].AsString; end; procedure TBalancesDataTableRules.SetDESCRIPCION3Value(const aValue: String); begin DataTable.Fields[idx_BalancesDESCRIPCION3].AsString := aValue; end; function TBalancesDataTableRules.GetDESCRIPCION3IsNull: boolean; begin result := DataTable.Fields[idx_BalancesDESCRIPCION3].IsNull; end; procedure TBalancesDataTableRules.SetDESCRIPCION3IsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_BalancesDESCRIPCION3].AsVariant := Null; end; initialization RegisterDataTableRules(RID_Balances, TBalancesDataTableRules); end.