unit schIntervalosClient_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_Intervalos = '{52D19107-1090-40B1-8819-96B88AB560ED}'; { Data table names } nme_Intervalos = 'Intervalos'; { Intervalos fields } fld_IntervalosCODIGO = 'CODIGO'; fld_IntervalosNOMBRE = 'NOMBRE'; fld_IntervalosDIAS = 'DIAS'; fld_IntervalosMESES = 'MESES'; fld_IntervalosANOS = 'ANOS'; { Intervalos field indexes } idx_IntervalosCODIGO = 0; idx_IntervalosNOMBRE = 1; idx_IntervalosDIAS = 2; idx_IntervalosMESES = 3; idx_IntervalosANOS = 4; type { IIntervalos } IIntervalos = interface(IDAStronglyTypedDataTable) ['{FEF7AB7C-76CC-42F2-B97A-556495EE2EA1}'] { Property getters and setters } function GetCODIGOValue: Integer; procedure SetCODIGOValue(const aValue: Integer); function GetNOMBREValue: String; procedure SetNOMBREValue(const aValue: String); function GetDIASValue: Integer; procedure SetDIASValue(const aValue: Integer); function GetMESESValue: Integer; procedure SetMESESValue(const aValue: Integer); function GetANOSValue: Integer; procedure SetANOSValue(const aValue: Integer); { Properties } property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property DIAS: Integer read GetDIASValue write SetDIASValue; property MESES: Integer read GetMESESValue write SetMESESValue; property ANOS: Integer read GetANOSValue write SetANOSValue; end; { TIntervalosDataTableRules } TIntervalosDataTableRules = class(TDADataTableRules, IIntervalos) private protected { Property getters and setters } function GetCODIGOValue: Integer; virtual; procedure SetCODIGOValue(const aValue: Integer); virtual; function GetNOMBREValue: String; virtual; procedure SetNOMBREValue(const aValue: String); virtual; function GetDIASValue: Integer; virtual; procedure SetDIASValue(const aValue: Integer); virtual; function GetMESESValue: Integer; virtual; procedure SetMESESValue(const aValue: Integer); virtual; function GetANOSValue: Integer; virtual; procedure SetANOSValue(const aValue: Integer); virtual; { Properties } property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property DIAS: Integer read GetDIASValue write SetDIASValue; property MESES: Integer read GetMESESValue write SetMESESValue; property ANOS: Integer read GetANOSValue write SetANOSValue; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants; { TIntervalosDataTableRules } constructor TIntervalosDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TIntervalosDataTableRules.Destroy; begin inherited; end; function TIntervalosDataTableRules.GetCODIGOValue: Integer; begin result := DataTable.Fields[idx_IntervalosCODIGO].AsInteger; end; procedure TIntervalosDataTableRules.SetCODIGOValue(const aValue: Integer); begin DataTable.Fields[idx_IntervalosCODIGO].AsInteger := aValue; end; function TIntervalosDataTableRules.GetNOMBREValue: String; begin result := DataTable.Fields[idx_IntervalosNOMBRE].AsString; end; procedure TIntervalosDataTableRules.SetNOMBREValue(const aValue: String); begin DataTable.Fields[idx_IntervalosNOMBRE].AsString := aValue; end; function TIntervalosDataTableRules.GetDIASValue: Integer; begin result := DataTable.Fields[idx_IntervalosDIAS].AsInteger; end; procedure TIntervalosDataTableRules.SetDIASValue(const aValue: Integer); begin DataTable.Fields[idx_IntervalosDIAS].AsInteger := aValue; end; function TIntervalosDataTableRules.GetMESESValue: Integer; begin result := DataTable.Fields[idx_IntervalosMESES].AsInteger; end; procedure TIntervalosDataTableRules.SetMESESValue(const aValue: Integer); begin DataTable.Fields[idx_IntervalosMESES].AsInteger := aValue; end; function TIntervalosDataTableRules.GetANOSValue: Integer; begin result := DataTable.Fields[idx_IntervalosANOS].AsInteger; end; procedure TIntervalosDataTableRules.SetANOSValue(const aValue: Integer); begin DataTable.Fields[idx_IntervalosANOS].AsInteger := aValue; end; initialization RegisterDataTableRules(RID_Intervalos, TIntervalosDataTableRules); end.