unit schInformesClient_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_Informes = '{F1EB3F72-7F66-4209-83FB-D24DF4D8C1AD}'; { Data table names } nme_Informes = 'Informes'; { Informes fields } fld_InformesID = 'ID'; fld_InformesID_EMPRESA = 'ID_EMPRESA'; fld_InformesCATEGORIA = 'CATEGORIA'; fld_InformesCONTROLLER = 'CONTROLLER'; fld_InformesMODIFICABLE = 'MODIFICABLE'; fld_InformesICONO = 'ICONO'; fld_InformesNOMBRE = 'NOMBRE'; fld_InformesDESCRIPCION = 'DESCRIPCION'; fld_InformesORDEN = 'ORDEN'; fld_InformesVISTA = 'VISTA'; fld_InformesTIPO_AGRUPACION = 'TIPO_AGRUPACION'; { Informes field indexes } idx_InformesID = 0; idx_InformesID_EMPRESA = 1; idx_InformesCATEGORIA = 2; idx_InformesCONTROLLER = 3; idx_InformesMODIFICABLE = 4; idx_InformesICONO = 5; idx_InformesNOMBRE = 6; idx_InformesDESCRIPCION = 7; idx_InformesORDEN = 8; idx_InformesVISTA = 9; idx_InformesTIPO_AGRUPACION = 10; type { IInformes } IInformes = interface(IDAStronglyTypedDataTable) ['{80065B7A-3C7F-4D5B-B205-398FA756792A}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetID_EMPRESAValue: Integer; procedure SetID_EMPRESAValue(const aValue: Integer); function GetCATEGORIAValue: String; procedure SetCATEGORIAValue(const aValue: String); function GetCONTROLLERValue: String; procedure SetCONTROLLERValue(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); function GetTIPO_AGRUPACIONValue: Integer; procedure SetTIPO_AGRUPACIONValue(const aValue: Integer); { Properties } property ID: Integer read GetIDValue write SetIDValue; property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue; property CONTROLLER: String read GetCONTROLLERValue write SetCONTROLLERValue; 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; property TIPO_AGRUPACION: Integer read GetTIPO_AGRUPACIONValue write SetTIPO_AGRUPACIONValue; end; { TInformesDataTableRules } TInformesDataTableRules = class(TDADataTableRules, IInformes) private protected { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetID_EMPRESAValue: Integer; virtual; procedure SetID_EMPRESAValue(const aValue: Integer); virtual; function GetCATEGORIAValue: String; virtual; procedure SetCATEGORIAValue(const aValue: String); virtual; function GetCONTROLLERValue: String; virtual; procedure SetCONTROLLERValue(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; function GetTIPO_AGRUPACIONValue: Integer; virtual; procedure SetTIPO_AGRUPACIONValue(const aValue: Integer); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue; property CONTROLLER: String read GetCONTROLLERValue write SetCONTROLLERValue; 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; property TIPO_AGRUPACION: Integer read GetTIPO_AGRUPACIONValue write SetTIPO_AGRUPACIONValue; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants; { TInformesDataTableRules } constructor TInformesDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TInformesDataTableRules.Destroy; begin inherited; end; function TInformesDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_InformesID].AsInteger; end; procedure TInformesDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_InformesID].AsInteger := aValue; end; function TInformesDataTableRules.GetID_EMPRESAValue: Integer; begin result := DataTable.Fields[idx_InformesID_EMPRESA].AsInteger; end; procedure TInformesDataTableRules.SetID_EMPRESAValue(const aValue: Integer); begin DataTable.Fields[idx_InformesID_EMPRESA].AsInteger := aValue; end; function TInformesDataTableRules.GetCATEGORIAValue: String; begin result := DataTable.Fields[idx_InformesCATEGORIA].AsString; end; procedure TInformesDataTableRules.SetCATEGORIAValue(const aValue: String); begin DataTable.Fields[idx_InformesCATEGORIA].AsString := aValue; end; function TInformesDataTableRules.GetCONTROLLERValue: String; begin result := DataTable.Fields[idx_InformesCONTROLLER].AsString; end; procedure TInformesDataTableRules.SetCONTROLLERValue(const aValue: String); begin DataTable.Fields[idx_InformesCONTROLLER].AsString := aValue; end; function TInformesDataTableRules.GetMODIFICABLEValue: String; begin result := DataTable.Fields[idx_InformesMODIFICABLE].AsString; end; procedure TInformesDataTableRules.SetMODIFICABLEValue(const aValue: String); begin DataTable.Fields[idx_InformesMODIFICABLE].AsString := aValue; end; function TInformesDataTableRules.GetICONOValue: Integer; begin result := DataTable.Fields[idx_InformesICONO].AsInteger; end; procedure TInformesDataTableRules.SetICONOValue(const aValue: Integer); begin DataTable.Fields[idx_InformesICONO].AsInteger := aValue; end; function TInformesDataTableRules.GetNOMBREValue: String; begin result := DataTable.Fields[idx_InformesNOMBRE].AsString; end; procedure TInformesDataTableRules.SetNOMBREValue(const aValue: String); begin DataTable.Fields[idx_InformesNOMBRE].AsString := aValue; end; function TInformesDataTableRules.GetDESCRIPCIONValue: String; begin result := DataTable.Fields[idx_InformesDESCRIPCION].AsString; end; procedure TInformesDataTableRules.SetDESCRIPCIONValue(const aValue: String); begin DataTable.Fields[idx_InformesDESCRIPCION].AsString := aValue; end; function TInformesDataTableRules.GetORDENValue: Integer; begin result := DataTable.Fields[idx_InformesORDEN].AsInteger; end; procedure TInformesDataTableRules.SetORDENValue(const aValue: Integer); begin DataTable.Fields[idx_InformesORDEN].AsInteger := aValue; end; function TInformesDataTableRules.GetVISTAValue: IROStrings; begin result := NewROStrings(); result.Text := DataTable.Fields[idx_InformesVISTA].AsString; end; procedure TInformesDataTableRules.SetVISTAValue(const aValue: IROStrings); begin DataTable.Fields[idx_InformesVISTA].AsString := aValue.Text; end; function TInformesDataTableRules.GetTIPO_AGRUPACIONValue: Integer; begin result := DataTable.Fields[idx_InformesTIPO_AGRUPACION].AsInteger; end; procedure TInformesDataTableRules.SetTIPO_AGRUPACIONValue(const aValue: Integer); begin DataTable.Fields[idx_InformesTIPO_AGRUPACION].AsInteger := aValue; end; initialization RegisterDataTableRules(RID_Informes, TInformesDataTableRules); end.