git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@239 0c75b7a4-871f-7646-8a2f-f78d34cc349f
135 lines
4.0 KiB
ObjectPascal
135 lines
4.0 KiB
ObjectPascal
unit schFamiliasClient_Intf;
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf;
|
|
|
|
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_Familias = '{BF295C1C-0281-4A3D-88CA-BF367A96144B}';
|
|
|
|
{ Data table names }
|
|
nme_Familias = 'Familias';
|
|
|
|
{ Familias fields }
|
|
fld_FamiliasID = 'ID';
|
|
fld_FamiliasDESCRIPCION = 'DESCRIPCION';
|
|
|
|
{ Familias field indexes }
|
|
idx_FamiliasID = 0;
|
|
idx_FamiliasDESCRIPCION = 1;
|
|
|
|
type
|
|
{ IFamilias }
|
|
IFamilias = interface(IDAStronglyTypedDataTable)
|
|
['{8FA3E165-5E9C-4333-8F87-56DED8F3D1EA}']
|
|
{ Property getters and setters }
|
|
function GetIDValue: Integer;
|
|
procedure SetIDValue(const aValue: Integer);
|
|
function GetIDIsNull: Boolean;
|
|
procedure SetIDIsNull(const aValue: Boolean);
|
|
function GetDESCRIPCIONValue: String;
|
|
procedure SetDESCRIPCIONValue(const aValue: String);
|
|
function GetDESCRIPCIONIsNull: Boolean;
|
|
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
|
|
|
|
|
|
{ Properties }
|
|
property ID: Integer read GetIDValue write SetIDValue;
|
|
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
|
|
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
|
|
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
|
|
end;
|
|
|
|
{ TFamiliasDataTableRules }
|
|
TFamiliasDataTableRules = class(TIntfObjectDADataTableRules, IFamilias)
|
|
private
|
|
protected
|
|
{ Property getters and setters }
|
|
function GetIDValue: Integer; virtual;
|
|
procedure SetIDValue(const aValue: Integer); virtual;
|
|
function GetIDIsNull: Boolean; virtual;
|
|
procedure SetIDIsNull(const aValue: Boolean); virtual;
|
|
function GetDESCRIPCIONValue: String; virtual;
|
|
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
|
|
function GetDESCRIPCIONIsNull: Boolean; virtual;
|
|
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
|
|
|
|
{ Properties }
|
|
property ID: Integer read GetIDValue write SetIDValue;
|
|
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
|
|
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
|
|
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
|
|
|
|
public
|
|
constructor Create(aDataTable: TDADataTable); override;
|
|
destructor Destroy; override;
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses Variants, uROBinaryHelpers;
|
|
|
|
{ TFamiliasDataTableRules }
|
|
constructor TFamiliasDataTableRules.Create(aDataTable: TDADataTable);
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
destructor TFamiliasDataTableRules.Destroy;
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
function TFamiliasDataTableRules.GetIDValue: Integer;
|
|
begin
|
|
result := DataTable.Fields[idx_FamiliasID].AsInteger;
|
|
end;
|
|
|
|
procedure TFamiliasDataTableRules.SetIDValue(const aValue: Integer);
|
|
begin
|
|
DataTable.Fields[idx_FamiliasID].AsInteger := aValue;
|
|
end;
|
|
|
|
function TFamiliasDataTableRules.GetIDIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_FamiliasID].IsNull;
|
|
end;
|
|
|
|
procedure TFamiliasDataTableRules.SetIDIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_FamiliasID].AsVariant := Null;
|
|
end;
|
|
|
|
function TFamiliasDataTableRules.GetDESCRIPCIONValue: String;
|
|
begin
|
|
result := DataTable.Fields[idx_FamiliasDESCRIPCION].AsString;
|
|
end;
|
|
|
|
procedure TFamiliasDataTableRules.SetDESCRIPCIONValue(const aValue: String);
|
|
begin
|
|
DataTable.Fields[idx_FamiliasDESCRIPCION].AsString := aValue;
|
|
end;
|
|
|
|
function TFamiliasDataTableRules.GetDESCRIPCIONIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_FamiliasDESCRIPCION].IsNull;
|
|
end;
|
|
|
|
procedure TFamiliasDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_FamiliasDESCRIPCION].AsVariant := Null;
|
|
end;
|
|
|
|
|
|
initialization
|
|
RegisterDataTableRules(RID_Familias, TFamiliasDataTableRules);
|
|
|
|
end.
|