unit schControlesClient_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_ListaControlesPorCategoria = '{E00A0F0C-CDD1-4E50-AED7-E0AD758A5DEF}'; { Data table names } nme_ListaControlesPorCategoria = 'ListaControlesPorCategoria'; { ListaControlesPorCategoria fields } fld_ListaControlesPorCategoriaID = 'ID'; fld_ListaControlesPorCategoriaCATEGORIA = 'CATEGORIA'; fld_ListaControlesPorCategoriaMODIFICABLE = 'MODIFICABLE'; fld_ListaControlesPorCategoriaICONO = 'ICONO'; fld_ListaControlesPorCategoriaNOMBRE = 'NOMBRE'; fld_ListaControlesPorCategoriaDESCRIPCION = 'DESCRIPCION'; fld_ListaControlesPorCategoriaORDEN = 'ORDEN'; fld_ListaControlesPorCategoriaVISTA = 'VISTA'; { ListaControlesPorCategoria field indexes } idx_ListaControlesPorCategoriaID = 0; idx_ListaControlesPorCategoriaCATEGORIA = 1; idx_ListaControlesPorCategoriaMODIFICABLE = 2; idx_ListaControlesPorCategoriaICONO = 3; idx_ListaControlesPorCategoriaNOMBRE = 4; idx_ListaControlesPorCategoriaDESCRIPCION = 5; idx_ListaControlesPorCategoriaORDEN = 6; idx_ListaControlesPorCategoriaVISTA = 7; type { IListaControlesPorCategoria } IListaControlesPorCategoria = interface(IDAStronglyTypedDataTable) ['{A9D98B29-EE5D-49D6-A871-DA34463DD0EC}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetCATEGORIAValue: String; procedure SetCATEGORIAValue(const aValue: String); function GetMODIFICABLEValue: String; procedure SetMODIFICABLEValue(const aValue: String); function GetICONOValue: Integer; procedure SetICONOValue(const aValue: Integer); function GetNOMBREValue: String; procedure SetNOMBREValue(const aValue: String); function GetDESCRIPCIONValue: String; procedure SetDESCRIPCIONValue(const aValue: String); function GetORDENValue: Integer; procedure SetORDENValue(const aValue: Integer); function GetVISTAValue: IROStrings; procedure SetVISTAValue(const aValue: IROStrings); { Properties } property ID: Integer read GetIDValue write SetIDValue; property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue; property MODIFICABLE: String read GetMODIFICABLEValue write SetMODIFICABLEValue; property ICONO: Integer read GetICONOValue write SetICONOValue; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property ORDEN: Integer read GetORDENValue write SetORDENValue; property VISTA: IROStrings read GetVISTAValue write SetVISTAValue; end; { TListaControlesPorCategoriaDataTableRules } TListaControlesPorCategoriaDataTableRules = class(TDADataTableRules, IListaControlesPorCategoria) private protected { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetCATEGORIAValue: String; virtual; procedure SetCATEGORIAValue(const aValue: String); virtual; function GetMODIFICABLEValue: String; virtual; procedure SetMODIFICABLEValue(const aValue: String); virtual; function GetICONOValue: Integer; virtual; procedure SetICONOValue(const aValue: Integer); virtual; function GetNOMBREValue: String; virtual; procedure SetNOMBREValue(const aValue: String); virtual; function GetDESCRIPCIONValue: String; virtual; procedure SetDESCRIPCIONValue(const aValue: String); virtual; function GetORDENValue: Integer; virtual; procedure SetORDENValue(const aValue: Integer); virtual; function GetVISTAValue: IROStrings; virtual; procedure SetVISTAValue(const aValue: IROStrings); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue; property MODIFICABLE: String read GetMODIFICABLEValue write SetMODIFICABLEValue; property ICONO: Integer read GetICONOValue write SetICONOValue; property NOMBRE: String read GetNOMBREValue write SetNOMBREValue; property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property ORDEN: Integer read GetORDENValue write SetORDENValue; property VISTA: IROStrings read GetVISTAValue write SetVISTAValue; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants; { TListaControlesPorCategoriaDataTableRules } constructor TListaControlesPorCategoriaDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TListaControlesPorCategoriaDataTableRules.Destroy; begin inherited; end; function TListaControlesPorCategoriaDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaID].AsInteger; end; procedure TListaControlesPorCategoriaDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_ListaControlesPorCategoriaID].AsInteger := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetCATEGORIAValue: String; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaCATEGORIA].AsString; end; procedure TListaControlesPorCategoriaDataTableRules.SetCATEGORIAValue(const aValue: String); begin DataTable.Fields[idx_ListaControlesPorCategoriaCATEGORIA].AsString := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetMODIFICABLEValue: String; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaMODIFICABLE].AsString; end; procedure TListaControlesPorCategoriaDataTableRules.SetMODIFICABLEValue(const aValue: String); begin DataTable.Fields[idx_ListaControlesPorCategoriaMODIFICABLE].AsString := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetICONOValue: Integer; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaICONO].AsInteger; end; procedure TListaControlesPorCategoriaDataTableRules.SetICONOValue(const aValue: Integer); begin DataTable.Fields[idx_ListaControlesPorCategoriaICONO].AsInteger := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetNOMBREValue: String; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaNOMBRE].AsString; end; procedure TListaControlesPorCategoriaDataTableRules.SetNOMBREValue(const aValue: String); begin DataTable.Fields[idx_ListaControlesPorCategoriaNOMBRE].AsString := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetDESCRIPCIONValue: String; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaDESCRIPCION].AsString; end; procedure TListaControlesPorCategoriaDataTableRules.SetDESCRIPCIONValue(const aValue: String); begin DataTable.Fields[idx_ListaControlesPorCategoriaDESCRIPCION].AsString := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetORDENValue: Integer; begin result := DataTable.Fields[idx_ListaControlesPorCategoriaORDEN].AsInteger; end; procedure TListaControlesPorCategoriaDataTableRules.SetORDENValue(const aValue: Integer); begin DataTable.Fields[idx_ListaControlesPorCategoriaORDEN].AsInteger := aValue; end; function TListaControlesPorCategoriaDataTableRules.GetVISTAValue: IROStrings; begin result := NewROStrings(); result.Text := DataTable.Fields[idx_ListaControlesPorCategoriaVISTA].AsString; end; procedure TListaControlesPorCategoriaDataTableRules.SetVISTAValue(const aValue: IROStrings); begin DataTable.Fields[idx_ListaControlesPorCategoriaVISTA].AsString := aValue.Text; end; initialization RegisterDataTableRules(RID_ListaControlesPorCategoria, TListaControlesPorCategoriaDataTableRules); end.