Tecsitel_FactuGES2/Source/Modulos/Referencias/Model/schReferenciasClient_Intf.pas

137 lines
4.2 KiB
ObjectPascal

unit schReferenciasClient_Intf;
interface
uses
Classes, DB, schBase_Intf, 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_Referencias = '{F79D045C-CF5A-4960-B700-8AA603E85E40}';
{ Data table names }
nme_Referencias = 'Referencias';
{ Referencias fields }
fld_ReferenciasCODIGO = 'CODIGO';
fld_ReferenciasDESCRIPCION = 'DESCRIPCION';
fld_ReferenciasVALOR = 'VALOR';
fld_ReferenciasID_EMPRESA = 'ID_EMPRESA';
{ Referencias field indexes }
idx_ReferenciasCODIGO = 0;
idx_ReferenciasDESCRIPCION = 1;
idx_ReferenciasVALOR = 2;
idx_ReferenciasID_EMPRESA = 3;
type
{ IReferencias }
IReferencias = interface(IDAStronglyTypedDataTable)
['{E55E8869-DE03-4568-91DF-BD2A7E7EAF84}']
{ Property getters and setters }
function GetCODIGOValue: String;
procedure SetCODIGOValue(const aValue: String);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetVALORValue: String;
procedure SetVALORValue(const aValue: String);
function GetID_EMPRESAValue: Integer;
procedure SetID_EMPRESAValue(const aValue: Integer);
{ Properties }
property CODIGO: String read GetCODIGOValue write SetCODIGOValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property VALOR: String read GetVALORValue write SetVALORValue;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
end;
{ TReferenciasDataTableRules }
TReferenciasDataTableRules = class(TIntfObjectDADataTableRules, IReferencias)
private
protected
{ Property getters and setters }
function GetCODIGOValue: String; virtual;
procedure SetCODIGOValue(const aValue: String); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetVALORValue: String; virtual;
procedure SetVALORValue(const aValue: String); virtual;
function GetID_EMPRESAValue: Integer; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
{ Properties }
property CODIGO: String read GetCODIGOValue write SetCODIGOValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property VALOR: String read GetVALORValue write SetVALORValue;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
{ TReferenciasDataTableRules }
constructor TReferenciasDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TReferenciasDataTableRules.Destroy;
begin
inherited;
end;
function TReferenciasDataTableRules.GetCODIGOValue: String;
begin
result := DataTable.Fields[idx_ReferenciasCODIGO].AsString;
end;
procedure TReferenciasDataTableRules.SetCODIGOValue(const aValue: String);
begin
DataTable.Fields[idx_ReferenciasCODIGO].AsString := aValue;
end;
function TReferenciasDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_ReferenciasDESCRIPCION].AsString;
end;
procedure TReferenciasDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_ReferenciasDESCRIPCION].AsString := aValue;
end;
function TReferenciasDataTableRules.GetVALORValue: String;
begin
result := DataTable.Fields[idx_ReferenciasVALOR].AsString;
end;
procedure TReferenciasDataTableRules.SetVALORValue(const aValue: String);
begin
DataTable.Fields[idx_ReferenciasVALOR].AsString := aValue;
end;
function TReferenciasDataTableRules.GetID_EMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_ReferenciasID_EMPRESA].AsInteger;
end;
procedure TReferenciasDataTableRules.SetID_EMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ReferenciasID_EMPRESA].AsInteger := aValue;
end;
initialization
RegisterDataTableRules(RID_Referencias, TReferenciasDataTableRules);
end.