This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Contactos/Reglas/schContactosClient_Intf.pas
2014-07-14 17:22:53 +00:00

581 lines
21 KiB
ObjectPascal

unit schContactosClient_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_Contactos = '{2E304B1A-43EE-4661-B4B4-BAE312233AAE}';
RID_CategoriasContacto = '{F1CC0094-A3C3-4B7C-9A34-DAE534948389}';
RID_Categorias = '{52845B38-2948-4EF8-935E-3CAAEAB43580}';
{ Data table names }
nme_Contactos = 'Contactos';
nme_CategoriasContacto = 'CategoriasContacto';
nme_Categorias = 'Categorias';
{ Contactos fields }
fld_ContactosCODIGOEMPRESA = 'CODIGOEMPRESA';
fld_ContactosCODIGO = 'CODIGO';
fld_ContactosFECHAALTA = 'FECHAALTA';
fld_ContactosUSUARIO = 'USUARIO';
fld_ContactosNIFCIF = 'NIFCIF';
fld_ContactosNOMBRE = 'NOMBRE';
fld_ContactosNOTAS = 'NOTAS';
fld_ContactosCALLE = 'CALLE';
fld_ContactosPROVINCIA = 'PROVINCIA';
fld_ContactosCODIGOPOSTAL = 'CODIGOPOSTAL';
fld_ContactosPOBLACION = 'POBLACION';
fld_ContactosTELEFONO1 = 'TELEFONO1';
fld_ContactosTELEFONO2 = 'TELEFONO2';
fld_ContactosMOVIL = 'MOVIL';
fld_ContactosFAX = 'FAX';
fld_ContactosCORREO1 = 'CORREO1';
fld_ContactosCORREO2 = 'CORREO2';
fld_ContactosPAGINAWEB = 'PAGINAWEB';
fld_ContactosPERSONACONTACTO = 'PERSONACONTACTO';
fld_ContactosBAJA_LOGICA = 'BAJA_LOGICA';
{ Contactos field indexes }
idx_ContactosCODIGOEMPRESA = 0;
idx_ContactosCODIGO = 1;
idx_ContactosFECHAALTA = 2;
idx_ContactosUSUARIO = 3;
idx_ContactosNIFCIF = 4;
idx_ContactosNOMBRE = 5;
idx_ContactosNOTAS = 6;
idx_ContactosCALLE = 7;
idx_ContactosPROVINCIA = 8;
idx_ContactosCODIGOPOSTAL = 9;
idx_ContactosPOBLACION = 10;
idx_ContactosTELEFONO1 = 11;
idx_ContactosTELEFONO2 = 12;
idx_ContactosMOVIL = 13;
idx_ContactosFAX = 14;
idx_ContactosCORREO1 = 15;
idx_ContactosCORREO2 = 16;
idx_ContactosPAGINAWEB = 17;
idx_ContactosPERSONACONTACTO = 18;
idx_ContactosBAJA_LOGICA = 19;
{ CategoriasContacto fields }
fld_CategoriasContactoCODIGOCONTACTO = 'CODIGOCONTACTO';
fld_CategoriasContactoCODIGOCATEGORIA = 'CODIGOCATEGORIA';
{ CategoriasContacto field indexes }
idx_CategoriasContactoCODIGOCONTACTO = 0;
idx_CategoriasContactoCODIGOCATEGORIA = 1;
{ Categorias fields }
fld_CategoriasCODIGO = 'CODIGO';
fld_CategoriasDESCRIPCION = 'DESCRIPCION';
{ Categorias field indexes }
idx_CategoriasCODIGO = 0;
idx_CategoriasDESCRIPCION = 1;
type
{ IContactos }
IContactos = interface(IDAStronglyTypedDataTable)
['{BC13E8F7-AD89-4144-BD91-EFCBDD612802}']
{ Property getters and setters }
function GetCODIGOEMPRESAValue: Integer;
procedure SetCODIGOEMPRESAValue(const aValue: Integer);
function GetCODIGOValue: Integer;
procedure SetCODIGOValue(const aValue: Integer);
function GetFECHAALTAValue: DateTime;
procedure SetFECHAALTAValue(const aValue: DateTime);
function GetUSUARIOValue: String;
procedure SetUSUARIOValue(const aValue: String);
function GetNIFCIFValue: String;
procedure SetNIFCIFValue(const aValue: String);
function GetNOMBREValue: String;
procedure SetNOMBREValue(const aValue: String);
function GetNOTASValue: String;
procedure SetNOTASValue(const aValue: String);
function GetCALLEValue: String;
procedure SetCALLEValue(const aValue: String);
function GetPROVINCIAValue: String;
procedure SetPROVINCIAValue(const aValue: String);
function GetCODIGOPOSTALValue: String;
procedure SetCODIGOPOSTALValue(const aValue: String);
function GetPOBLACIONValue: String;
procedure SetPOBLACIONValue(const aValue: String);
function GetTELEFONO1Value: String;
procedure SetTELEFONO1Value(const aValue: String);
function GetTELEFONO2Value: String;
procedure SetTELEFONO2Value(const aValue: String);
function GetMOVILValue: String;
procedure SetMOVILValue(const aValue: String);
function GetFAXValue: String;
procedure SetFAXValue(const aValue: String);
function GetCORREO1Value: String;
procedure SetCORREO1Value(const aValue: String);
function GetCORREO2Value: String;
procedure SetCORREO2Value(const aValue: String);
function GetPAGINAWEBValue: String;
procedure SetPAGINAWEBValue(const aValue: String);
function GetPERSONACONTACTOValue: String;
procedure SetPERSONACONTACTOValue(const aValue: String);
function GetBAJA_LOGICAValue: Integer;
procedure SetBAJA_LOGICAValue(const aValue: Integer);
{ Properties }
property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property FECHAALTA: DateTime read GetFECHAALTAValue write SetFECHAALTAValue;
property USUARIO: String read GetUSUARIOValue write SetUSUARIOValue;
property NIFCIF: String read GetNIFCIFValue write SetNIFCIFValue;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property NOTAS: String read GetNOTASValue write SetNOTASValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property CODIGOPOSTAL: String read GetCODIGOPOSTALValue write SetCODIGOPOSTALValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
property TELEFONO1: String read GetTELEFONO1Value write SetTELEFONO1Value;
property TELEFONO2: String read GetTELEFONO2Value write SetTELEFONO2Value;
property MOVIL: String read GetMOVILValue write SetMOVILValue;
property FAX: String read GetFAXValue write SetFAXValue;
property CORREO1: String read GetCORREO1Value write SetCORREO1Value;
property CORREO2: String read GetCORREO2Value write SetCORREO2Value;
property PAGINAWEB: String read GetPAGINAWEBValue write SetPAGINAWEBValue;
property PERSONACONTACTO: String read GetPERSONACONTACTOValue write SetPERSONACONTACTOValue;
property BAJA_LOGICA: Integer read GetBAJA_LOGICAValue write SetBAJA_LOGICAValue;
end;
{ TContactosDataTableRules }
TContactosDataTableRules = class(TDADataTableRules, IContactos)
private
protected
{ Property getters and setters }
function GetCODIGOEMPRESAValue: Integer; virtual;
procedure SetCODIGOEMPRESAValue(const aValue: Integer); virtual;
function GetCODIGOValue: Integer; virtual;
procedure SetCODIGOValue(const aValue: Integer); virtual;
function GetFECHAALTAValue: DateTime; virtual;
procedure SetFECHAALTAValue(const aValue: DateTime); virtual;
function GetUSUARIOValue: String; virtual;
procedure SetUSUARIOValue(const aValue: String); virtual;
function GetNIFCIFValue: String; virtual;
procedure SetNIFCIFValue(const aValue: String); virtual;
function GetNOMBREValue: String; virtual;
procedure SetNOMBREValue(const aValue: String); virtual;
function GetNOTASValue: String; virtual;
procedure SetNOTASValue(const aValue: String); virtual;
function GetCALLEValue: String; virtual;
procedure SetCALLEValue(const aValue: String); virtual;
function GetPROVINCIAValue: String; virtual;
procedure SetPROVINCIAValue(const aValue: String); virtual;
function GetCODIGOPOSTALValue: String; virtual;
procedure SetCODIGOPOSTALValue(const aValue: String); virtual;
function GetPOBLACIONValue: String; virtual;
procedure SetPOBLACIONValue(const aValue: String); virtual;
function GetTELEFONO1Value: String; virtual;
procedure SetTELEFONO1Value(const aValue: String); virtual;
function GetTELEFONO2Value: String; virtual;
procedure SetTELEFONO2Value(const aValue: String); virtual;
function GetMOVILValue: String; virtual;
procedure SetMOVILValue(const aValue: String); virtual;
function GetFAXValue: String; virtual;
procedure SetFAXValue(const aValue: String); virtual;
function GetCORREO1Value: String; virtual;
procedure SetCORREO1Value(const aValue: String); virtual;
function GetCORREO2Value: String; virtual;
procedure SetCORREO2Value(const aValue: String); virtual;
function GetPAGINAWEBValue: String; virtual;
procedure SetPAGINAWEBValue(const aValue: String); virtual;
function GetPERSONACONTACTOValue: String; virtual;
procedure SetPERSONACONTACTOValue(const aValue: String); virtual;
function GetBAJA_LOGICAValue: Integer; virtual;
procedure SetBAJA_LOGICAValue(const aValue: Integer); virtual;
{ Properties }
property CODIGOEMPRESA: Integer read GetCODIGOEMPRESAValue write SetCODIGOEMPRESAValue;
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property FECHAALTA: DateTime read GetFECHAALTAValue write SetFECHAALTAValue;
property USUARIO: String read GetUSUARIOValue write SetUSUARIOValue;
property NIFCIF: String read GetNIFCIFValue write SetNIFCIFValue;
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property NOTAS: String read GetNOTASValue write SetNOTASValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property CODIGOPOSTAL: String read GetCODIGOPOSTALValue write SetCODIGOPOSTALValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
property TELEFONO1: String read GetTELEFONO1Value write SetTELEFONO1Value;
property TELEFONO2: String read GetTELEFONO2Value write SetTELEFONO2Value;
property MOVIL: String read GetMOVILValue write SetMOVILValue;
property FAX: String read GetFAXValue write SetFAXValue;
property CORREO1: String read GetCORREO1Value write SetCORREO1Value;
property CORREO2: String read GetCORREO2Value write SetCORREO2Value;
property PAGINAWEB: String read GetPAGINAWEBValue write SetPAGINAWEBValue;
property PERSONACONTACTO: String read GetPERSONACONTACTOValue write SetPERSONACONTACTOValue;
property BAJA_LOGICA: Integer read GetBAJA_LOGICAValue write SetBAJA_LOGICAValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ ICategoriasContacto }
ICategoriasContacto = interface(IDAStronglyTypedDataTable)
['{A306C356-1870-460A-A65D-10E99C8350D3}']
{ Property getters and setters }
function GetCODIGOCONTACTOValue: Integer;
procedure SetCODIGOCONTACTOValue(const aValue: Integer);
function GetCODIGOCATEGORIAValue: Integer;
procedure SetCODIGOCATEGORIAValue(const aValue: Integer);
{ Properties }
property CODIGOCONTACTO: Integer read GetCODIGOCONTACTOValue write SetCODIGOCONTACTOValue;
property CODIGOCATEGORIA: Integer read GetCODIGOCATEGORIAValue write SetCODIGOCATEGORIAValue;
end;
{ TCategoriasContactoDataTableRules }
TCategoriasContactoDataTableRules = class(TDADataTableRules, ICategoriasContacto)
private
protected
{ Property getters and setters }
function GetCODIGOCONTACTOValue: Integer; virtual;
procedure SetCODIGOCONTACTOValue(const aValue: Integer); virtual;
function GetCODIGOCATEGORIAValue: Integer; virtual;
procedure SetCODIGOCATEGORIAValue(const aValue: Integer); virtual;
{ Properties }
property CODIGOCONTACTO: Integer read GetCODIGOCONTACTOValue write SetCODIGOCONTACTOValue;
property CODIGOCATEGORIA: Integer read GetCODIGOCATEGORIAValue write SetCODIGOCATEGORIAValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
{ ICategorias }
ICategorias = interface(IDAStronglyTypedDataTable)
['{FCC1DE55-D22D-44B2-881D-BF4965EE3F51}']
{ Property getters and setters }
function GetCODIGOValue: Integer;
procedure SetCODIGOValue(const aValue: Integer);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
{ Properties }
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
end;
{ TCategoriasDataTableRules }
TCategoriasDataTableRules = class(TDADataTableRules, ICategorias)
private
protected
{ Property getters and setters }
function GetCODIGOValue: Integer; virtual;
procedure SetCODIGOValue(const aValue: Integer); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
{ Properties }
property CODIGO: Integer read GetCODIGOValue write SetCODIGOValue;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
{ TContactosDataTableRules }
constructor TContactosDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TContactosDataTableRules.Destroy;
begin
inherited;
end;
function TContactosDataTableRules.GetCODIGOEMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_ContactosCODIGOEMPRESA].AsInteger;
end;
procedure TContactosDataTableRules.SetCODIGOEMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ContactosCODIGOEMPRESA].AsInteger := aValue;
end;
function TContactosDataTableRules.GetCODIGOValue: Integer;
begin
result := DataTable.Fields[idx_ContactosCODIGO].AsInteger;
end;
procedure TContactosDataTableRules.SetCODIGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ContactosCODIGO].AsInteger := aValue;
end;
function TContactosDataTableRules.GetFECHAALTAValue: DateTime;
begin
result := DataTable.Fields[idx_ContactosFECHAALTA].AsDateTime;
end;
procedure TContactosDataTableRules.SetFECHAALTAValue(const aValue: DateTime);
begin
DataTable.Fields[idx_ContactosFECHAALTA].AsDateTime := aValue;
end;
function TContactosDataTableRules.GetUSUARIOValue: String;
begin
result := DataTable.Fields[idx_ContactosUSUARIO].AsString;
end;
procedure TContactosDataTableRules.SetUSUARIOValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosUSUARIO].AsString := aValue;
end;
function TContactosDataTableRules.GetNIFCIFValue: String;
begin
result := DataTable.Fields[idx_ContactosNIFCIF].AsString;
end;
procedure TContactosDataTableRules.SetNIFCIFValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosNIFCIF].AsString := aValue;
end;
function TContactosDataTableRules.GetNOMBREValue: String;
begin
result := DataTable.Fields[idx_ContactosNOMBRE].AsString;
end;
procedure TContactosDataTableRules.SetNOMBREValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosNOMBRE].AsString := aValue;
end;
function TContactosDataTableRules.GetNOTASValue: String;
begin
result := DataTable.Fields[idx_ContactosNOTAS].AsString;
end;
procedure TContactosDataTableRules.SetNOTASValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosNOTAS].AsString := aValue;
end;
function TContactosDataTableRules.GetCALLEValue: String;
begin
result := DataTable.Fields[idx_ContactosCALLE].AsString;
end;
procedure TContactosDataTableRules.SetCALLEValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosCALLE].AsString := aValue;
end;
function TContactosDataTableRules.GetPROVINCIAValue: String;
begin
result := DataTable.Fields[idx_ContactosPROVINCIA].AsString;
end;
procedure TContactosDataTableRules.SetPROVINCIAValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosPROVINCIA].AsString := aValue;
end;
function TContactosDataTableRules.GetCODIGOPOSTALValue: String;
begin
result := DataTable.Fields[idx_ContactosCODIGOPOSTAL].AsString;
end;
procedure TContactosDataTableRules.SetCODIGOPOSTALValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosCODIGOPOSTAL].AsString := aValue;
end;
function TContactosDataTableRules.GetPOBLACIONValue: String;
begin
result := DataTable.Fields[idx_ContactosPOBLACION].AsString;
end;
procedure TContactosDataTableRules.SetPOBLACIONValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosPOBLACION].AsString := aValue;
end;
function TContactosDataTableRules.GetTELEFONO1Value: String;
begin
result := DataTable.Fields[idx_ContactosTELEFONO1].AsString;
end;
procedure TContactosDataTableRules.SetTELEFONO1Value(const aValue: String);
begin
DataTable.Fields[idx_ContactosTELEFONO1].AsString := aValue;
end;
function TContactosDataTableRules.GetTELEFONO2Value: String;
begin
result := DataTable.Fields[idx_ContactosTELEFONO2].AsString;
end;
procedure TContactosDataTableRules.SetTELEFONO2Value(const aValue: String);
begin
DataTable.Fields[idx_ContactosTELEFONO2].AsString := aValue;
end;
function TContactosDataTableRules.GetMOVILValue: String;
begin
result := DataTable.Fields[idx_ContactosMOVIL].AsString;
end;
procedure TContactosDataTableRules.SetMOVILValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosMOVIL].AsString := aValue;
end;
function TContactosDataTableRules.GetFAXValue: String;
begin
result := DataTable.Fields[idx_ContactosFAX].AsString;
end;
procedure TContactosDataTableRules.SetFAXValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosFAX].AsString := aValue;
end;
function TContactosDataTableRules.GetCORREO1Value: String;
begin
result := DataTable.Fields[idx_ContactosCORREO1].AsString;
end;
procedure TContactosDataTableRules.SetCORREO1Value(const aValue: String);
begin
DataTable.Fields[idx_ContactosCORREO1].AsString := aValue;
end;
function TContactosDataTableRules.GetCORREO2Value: String;
begin
result := DataTable.Fields[idx_ContactosCORREO2].AsString;
end;
procedure TContactosDataTableRules.SetCORREO2Value(const aValue: String);
begin
DataTable.Fields[idx_ContactosCORREO2].AsString := aValue;
end;
function TContactosDataTableRules.GetPAGINAWEBValue: String;
begin
result := DataTable.Fields[idx_ContactosPAGINAWEB].AsString;
end;
procedure TContactosDataTableRules.SetPAGINAWEBValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosPAGINAWEB].AsString := aValue;
end;
function TContactosDataTableRules.GetPERSONACONTACTOValue: String;
begin
result := DataTable.Fields[idx_ContactosPERSONACONTACTO].AsString;
end;
procedure TContactosDataTableRules.SetPERSONACONTACTOValue(const aValue: String);
begin
DataTable.Fields[idx_ContactosPERSONACONTACTO].AsString := aValue;
end;
function TContactosDataTableRules.GetBAJA_LOGICAValue: Integer;
begin
result := DataTable.Fields[idx_ContactosBAJA_LOGICA].AsInteger;
end;
procedure TContactosDataTableRules.SetBAJA_LOGICAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ContactosBAJA_LOGICA].AsInteger := aValue;
end;
{ TCategoriasContactoDataTableRules }
constructor TCategoriasContactoDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TCategoriasContactoDataTableRules.Destroy;
begin
inherited;
end;
function TCategoriasContactoDataTableRules.GetCODIGOCONTACTOValue: Integer;
begin
result := DataTable.Fields[idx_CategoriasContactoCODIGOCONTACTO].AsInteger;
end;
procedure TCategoriasContactoDataTableRules.SetCODIGOCONTACTOValue(const aValue: Integer);
begin
DataTable.Fields[idx_CategoriasContactoCODIGOCONTACTO].AsInteger := aValue;
end;
function TCategoriasContactoDataTableRules.GetCODIGOCATEGORIAValue: Integer;
begin
result := DataTable.Fields[idx_CategoriasContactoCODIGOCATEGORIA].AsInteger;
end;
procedure TCategoriasContactoDataTableRules.SetCODIGOCATEGORIAValue(const aValue: Integer);
begin
DataTable.Fields[idx_CategoriasContactoCODIGOCATEGORIA].AsInteger := aValue;
end;
{ TCategoriasDataTableRules }
constructor TCategoriasDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TCategoriasDataTableRules.Destroy;
begin
inherited;
end;
function TCategoriasDataTableRules.GetCODIGOValue: Integer;
begin
result := DataTable.Fields[idx_CategoriasCODIGO].AsInteger;
end;
procedure TCategoriasDataTableRules.SetCODIGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_CategoriasCODIGO].AsInteger := aValue;
end;
function TCategoriasDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_CategoriasDESCRIPCION].AsString;
end;
procedure TCategoriasDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_CategoriasDESCRIPCION].AsString := aValue;
end;
initialization
RegisterDataTableRules(RID_Contactos, TContactosDataTableRules);
RegisterDataTableRules(RID_CategoriasContacto, TCategoriasContactoDataTableRules);
RegisterDataTableRules(RID_Categorias, TCategoriasDataTableRules);
end.