unit schCuentasClient_Intf; interface uses Classes, DB, SysUtils, uROClasses, uDADataTable; 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_Cuentas = '{FD2A065D-876F-41F3-A883-9B5E665718B4}'; { Data table names } nme_Cuentas = 'Cuentas'; { Cuentas fields } fld_CuentasCODIGOEMPRESA = 'CODIGOEMPRESA'; fld_CuentasCODIGO = 'CODIGO'; fld_CuentasFECHAALTA = 'FECHAALTA'; fld_CuentasUSUARIO = 'USUARIO'; fld_CuentasNOMBRE = 'NOMBRE'; fld_CuentasOTROSDATOS = 'OTROSDATOS'; fld_CuentasULTIMOCIERRE = 'ULTIMOCIERRE'; fld_CuentasPENULTIMOCIERRE = 'PENULTIMOCIERRE'; { Cuentas field indexes } idx_CuentasCODIGOEMPRESA = 0; idx_CuentasCODIGO = 1; idx_CuentasFECHAALTA = 2; idx_CuentasUSUARIO = 3; idx_CuentasNOMBRE = 4; idx_CuentasOTROSDATOS = 5; idx_CuentasULTIMOCIERRE = 6; idx_CuentasPENULTIMOCIERRE = 7; type { ICuentas } ICuentas = interface(IDAStronglyTypedDataTable) ['{81148F99-BE98-4AAA-9572-9D985476978F}'] { Property getters and setters } function GetCODIGOEMPRESAValue: Integer; procedure SetCODIGOEMPRESAValue(const aValue: Integer); function GetCODIGOValue: Integer; procedure SetCODIGOValue(const aValue: Integer); function GetFECHAALTAValue: DateTime; procedure SetFECHAALTAValue(const aValue: DateTime); function GetUSUARIOValue: String; procedure SetUSUARIOValue(const aValue: String); function GetNOMBREValue: String; procedure SetNOMBREValue(const aValue: String); function GetOTROSDATOSValue: IROStrings; procedure SetOTROSDATOSValue(const aValue: IROStrings); function GetULTIMOCIERREValue: DateTime; procedure SetULTIMOCIERREValue(const aValue: DateTime); function GetPENULTIMOCIERREValue: DateTime; procedure SetPENULTIMOCIERREValue(const aValue: DateTime); { Properties } property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue; property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue; property FECHAALTA: DateTime read GetFECHAALTAValue write SetFECHAALTAValue; property USUARIO: String read GetUSUARIOValue write SetUSUARIOValue; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property OTROSDATOS: IROStrings read GetOTROSDATOSValue write SetOTROSDATOSValue; property ULTIMOCIERRE: DateTime read GetULTIMOCIERREValue write SetULTIMOCIERREValue; property PENULTIMOCIERRE: DateTime read GetPENULTIMOCIERREValue write SetPENULTIMOCIERREValue; end; { TCuentasDataTableRules } TCuentasDataTableRules = class(TDADataTableRules, ICuentas) private protected { Property getters and setters } function GetCODIGOEMPRESAValue: Integer; virtual; procedure SetCODIGOEMPRESAValue(const aValue: Integer); virtual; function GetCODIGOValue: Integer; virtual; procedure SetCODIGOValue(const aValue: Integer); virtual; function GetFECHAALTAValue: DateTime; virtual; procedure SetFECHAALTAValue(const aValue: DateTime); virtual; function GetUSUARIOValue: String; virtual; procedure SetUSUARIOValue(const aValue: String); virtual; function GetNOMBREValue: String; virtual; procedure SetNOMBREValue(const aValue: String); virtual; function GetOTROSDATOSValue: IROStrings; virtual; procedure SetOTROSDATOSValue(const aValue: IROStrings); virtual; function GetULTIMOCIERREValue: DateTime; virtual; procedure SetULTIMOCIERREValue(const aValue: DateTime); virtual; function GetPENULTIMOCIERREValue: DateTime; virtual; procedure SetPENULTIMOCIERREValue(const aValue: DateTime); virtual; { Properties } property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue; property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue; property FECHAALTA: DateTime read GetFECHAALTAValue write SetFECHAALTAValue; property USUARIO: String read GetUSUARIOValue write SetUSUARIOValue; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property OTROSDATOS: IROStrings read GetOTROSDATOSValue write SetOTROSDATOSValue; property ULTIMOCIERRE: DateTime read GetULTIMOCIERREValue write SetULTIMOCIERREValue; property PENULTIMOCIERRE: DateTime read GetPENULTIMOCIERREValue write SetPENULTIMOCIERREValue; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants; { TCuentasDataTableRules } constructor TCuentasDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TCuentasDataTableRules.Destroy; begin inherited; end; function TCuentasDataTableRules.GetCODIGOEMPRESAValue: Integer; begin result := DataTable.Fields[idx_CuentasCODIGOEMPRESA].AsInteger; end; procedure TCuentasDataTableRules.SetCODIGOEMPRESAValue(const aValue: Integer); begin DataTable.Fields[idx_CuentasCODIGOEMPRESA].AsInteger := aValue; end; function TCuentasDataTableRules.GetCODIGOValue: Integer; begin result := DataTable.Fields[idx_CuentasCODIGO].AsInteger; end; procedure TCuentasDataTableRules.SetCODIGOValue(const aValue: Integer); begin DataTable.Fields[idx_CuentasCODIGO].AsInteger := aValue; end; function TCuentasDataTableRules.GetFECHAALTAValue: DateTime; begin result := DataTable.Fields[idx_CuentasFECHAALTA].AsDateTime; end; procedure TCuentasDataTableRules.SetFECHAALTAValue(const aValue: DateTime); begin DataTable.Fields[idx_CuentasFECHAALTA].AsDateTime := aValue; end; function TCuentasDataTableRules.GetUSUARIOValue: String; begin result := DataTable.Fields[idx_CuentasUSUARIO].AsString; end; procedure TCuentasDataTableRules.SetUSUARIOValue(const aValue: String); begin DataTable.Fields[idx_CuentasUSUARIO].AsString := aValue; end; function TCuentasDataTableRules.GetNOMBREValue: String; begin result := DataTable.Fields[idx_CuentasNOMBRE].AsString; end; procedure TCuentasDataTableRules.SetNOMBREValue(const aValue: String); begin DataTable.Fields[idx_CuentasNOMBRE].AsString := aValue; end; function TCuentasDataTableRules.GetOTROSDATOSValue: IROStrings; begin result := NewROStrings(); result.Text := DataTable.Fields[idx_CuentasOTROSDATOS].AsString; end; procedure TCuentasDataTableRules.SetOTROSDATOSValue(const aValue: IROStrings); begin DataTable.Fields[idx_CuentasOTROSDATOS].AsString := aValue.Text; end; function TCuentasDataTableRules.GetULTIMOCIERREValue: DateTime; begin result := DataTable.Fields[idx_CuentasULTIMOCIERRE].AsDateTime; end; procedure TCuentasDataTableRules.SetULTIMOCIERREValue(const aValue: DateTime); begin DataTable.Fields[idx_CuentasULTIMOCIERRE].AsDateTime := aValue; end; function TCuentasDataTableRules.GetPENULTIMOCIERREValue: DateTime; begin result := DataTable.Fields[idx_CuentasPENULTIMOCIERRE].AsDateTime; end; procedure TCuentasDataTableRules.SetPENULTIMOCIERREValue(const aValue: DateTime); begin DataTable.Fields[idx_CuentasPENULTIMOCIERRE].AsDateTime := aValue; end; initialization RegisterDataTableRules(RID_Cuentas, TCuentasDataTableRules); end.