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/Almacenes/Reglas/schAlmacenesClient_Intf.pas
2007-06-21 16:02:50 +00:00

318 lines
11 KiB
ObjectPascal

unit schAlmacenesClient_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_ALMACENES = '{E40FF005-6127-4C15-B90B-62D1944091F3}';
{ Data table names }
nme_ALMACENES = 'ALMACENES';
{ ALMACENES fields }
fld_ALMACENESCODIGOEMPRESA = 'CODIGOEMPRESA';
fld_ALMACENESCODIGO = 'CODIGO';
fld_ALMACENESFECHAALTA = 'FECHAALTA';
fld_ALMACENESUSUARIO = 'USUARIO';
fld_ALMACENESNOMBRE = 'NOMBRE';
fld_ALMACENESCALLE = 'CALLE';
fld_ALMACENESPROVINCIA = 'PROVINCIA';
fld_ALMACENESPOBLACION = 'POBLACION';
fld_ALMACENESCODIGOPOSTAL = 'CODIGOPOSTAL';
fld_ALMACENESTELEFONO = 'TELEFONO';
fld_ALMACENESMOVIL = 'MOVIL';
fld_ALMACENESFAX = 'FAX';
fld_ALMACENESPERSONACONTACTO = 'PERSONACONTACTO';
fld_ALMACENESOBSERVACIONES = 'OBSERVACIONES';
{ ALMACENES field indexes }
idx_ALMACENESCODIGOEMPRESA = 0;
idx_ALMACENESCODIGO = 1;
idx_ALMACENESFECHAALTA = 2;
idx_ALMACENESUSUARIO = 3;
idx_ALMACENESNOMBRE = 4;
idx_ALMACENESCALLE = 5;
idx_ALMACENESPROVINCIA = 6;
idx_ALMACENESPOBLACION = 7;
idx_ALMACENESCODIGOPOSTAL = 8;
idx_ALMACENESTELEFONO = 9;
idx_ALMACENESMOVIL = 10;
idx_ALMACENESFAX = 11;
idx_ALMACENESPERSONACONTACTO = 12;
idx_ALMACENESOBSERVACIONES = 13;
type
{ IALMACENES }
IALMACENES = interface(IDAStronglyTypedDataTable)
['{3E2C271E-51D7-4838-98EC-BB629026C37C}']
{ 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 GetNOMBREValue: String;
procedure SetNOMBREValue(const aValue: String);
function GetCALLEValue: String;
procedure SetCALLEValue(const aValue: String);
function GetPROVINCIAValue: String;
procedure SetPROVINCIAValue(const aValue: String);
function GetPOBLACIONValue: String;
procedure SetPOBLACIONValue(const aValue: String);
function GetCODIGOPOSTALValue: String;
procedure SetCODIGOPOSTALValue(const aValue: String);
function GetTELEFONOValue: String;
procedure SetTELEFONOValue(const aValue: String);
function GetMOVILValue: String;
procedure SetMOVILValue(const aValue: String);
function GetFAXValue: String;
procedure SetFAXValue(const aValue: String);
function GetPERSONACONTACTOValue: String;
procedure SetPERSONACONTACTOValue(const aValue: String);
function GetOBSERVACIONESValue: IROStrings;
procedure SetOBSERVACIONESValue(const aValue: IROStrings);
{ 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 NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
property CODIGOPOSTAL: String read GetCODIGOPOSTALValue write SetCODIGOPOSTALValue;
property TELEFONO: String read GetTELEFONOValue write SetTELEFONOValue;
property MOVIL: String read GetMOVILValue write SetMOVILValue;
property FAX: String read GetFAXValue write SetFAXValue;
property PERSONACONTACTO: String read GetPERSONACONTACTOValue write SetPERSONACONTACTOValue;
property OBSERVACIONES: IROStrings read GetOBSERVACIONESValue write SetOBSERVACIONESValue;
end;
{ TALMACENESDataTableRules }
TALMACENESDataTableRules = class(TDADataTableRules, IALMACENES)
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 GetNOMBREValue: String; virtual;
procedure SetNOMBREValue(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 GetPOBLACIONValue: String; virtual;
procedure SetPOBLACIONValue(const aValue: String); virtual;
function GetCODIGOPOSTALValue: String; virtual;
procedure SetCODIGOPOSTALValue(const aValue: String); virtual;
function GetTELEFONOValue: String; virtual;
procedure SetTELEFONOValue(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 GetPERSONACONTACTOValue: String; virtual;
procedure SetPERSONACONTACTOValue(const aValue: String); virtual;
function GetOBSERVACIONESValue: IROStrings; virtual;
procedure SetOBSERVACIONESValue(const aValue: IROStrings); 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 NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
property CALLE: String read GetCALLEValue write SetCALLEValue;
property PROVINCIA: String read GetPROVINCIAValue write SetPROVINCIAValue;
property POBLACION: String read GetPOBLACIONValue write SetPOBLACIONValue;
property CODIGOPOSTAL: String read GetCODIGOPOSTALValue write SetCODIGOPOSTALValue;
property TELEFONO: String read GetTELEFONOValue write SetTELEFONOValue;
property MOVIL: String read GetMOVILValue write SetMOVILValue;
property FAX: String read GetFAXValue write SetFAXValue;
property PERSONACONTACTO: String read GetPERSONACONTACTOValue write SetPERSONACONTACTOValue;
property OBSERVACIONES: IROStrings read GetOBSERVACIONESValue write SetOBSERVACIONESValue;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants;
{ TALMACENESDataTableRules }
constructor TALMACENESDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TALMACENESDataTableRules.Destroy;
begin
inherited;
end;
function TALMACENESDataTableRules.GetCODIGOEMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_ALMACENESCODIGOEMPRESA].AsInteger;
end;
procedure TALMACENESDataTableRules.SetCODIGOEMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ALMACENESCODIGOEMPRESA].AsInteger := aValue;
end;
function TALMACENESDataTableRules.GetCODIGOValue: Integer;
begin
result := DataTable.Fields[idx_ALMACENESCODIGO].AsInteger;
end;
procedure TALMACENESDataTableRules.SetCODIGOValue(const aValue: Integer);
begin
DataTable.Fields[idx_ALMACENESCODIGO].AsInteger := aValue;
end;
function TALMACENESDataTableRules.GetFECHAALTAValue: DateTime;
begin
result := DataTable.Fields[idx_ALMACENESFECHAALTA].AsDateTime;
end;
procedure TALMACENESDataTableRules.SetFECHAALTAValue(const aValue: DateTime);
begin
DataTable.Fields[idx_ALMACENESFECHAALTA].AsDateTime := aValue;
end;
function TALMACENESDataTableRules.GetUSUARIOValue: String;
begin
result := DataTable.Fields[idx_ALMACENESUSUARIO].AsString;
end;
procedure TALMACENESDataTableRules.SetUSUARIOValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESUSUARIO].AsString := aValue;
end;
function TALMACENESDataTableRules.GetNOMBREValue: String;
begin
result := DataTable.Fields[idx_ALMACENESNOMBRE].AsString;
end;
procedure TALMACENESDataTableRules.SetNOMBREValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESNOMBRE].AsString := aValue;
end;
function TALMACENESDataTableRules.GetCALLEValue: String;
begin
result := DataTable.Fields[idx_ALMACENESCALLE].AsString;
end;
procedure TALMACENESDataTableRules.SetCALLEValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESCALLE].AsString := aValue;
end;
function TALMACENESDataTableRules.GetPROVINCIAValue: String;
begin
result := DataTable.Fields[idx_ALMACENESPROVINCIA].AsString;
end;
procedure TALMACENESDataTableRules.SetPROVINCIAValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESPROVINCIA].AsString := aValue;
end;
function TALMACENESDataTableRules.GetPOBLACIONValue: String;
begin
result := DataTable.Fields[idx_ALMACENESPOBLACION].AsString;
end;
procedure TALMACENESDataTableRules.SetPOBLACIONValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESPOBLACION].AsString := aValue;
end;
function TALMACENESDataTableRules.GetCODIGOPOSTALValue: String;
begin
result := DataTable.Fields[idx_ALMACENESCODIGOPOSTAL].AsString;
end;
procedure TALMACENESDataTableRules.SetCODIGOPOSTALValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESCODIGOPOSTAL].AsString := aValue;
end;
function TALMACENESDataTableRules.GetTELEFONOValue: String;
begin
result := DataTable.Fields[idx_ALMACENESTELEFONO].AsString;
end;
procedure TALMACENESDataTableRules.SetTELEFONOValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESTELEFONO].AsString := aValue;
end;
function TALMACENESDataTableRules.GetMOVILValue: String;
begin
result := DataTable.Fields[idx_ALMACENESMOVIL].AsString;
end;
procedure TALMACENESDataTableRules.SetMOVILValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESMOVIL].AsString := aValue;
end;
function TALMACENESDataTableRules.GetFAXValue: String;
begin
result := DataTable.Fields[idx_ALMACENESFAX].AsString;
end;
procedure TALMACENESDataTableRules.SetFAXValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESFAX].AsString := aValue;
end;
function TALMACENESDataTableRules.GetPERSONACONTACTOValue: String;
begin
result := DataTable.Fields[idx_ALMACENESPERSONACONTACTO].AsString;
end;
procedure TALMACENESDataTableRules.SetPERSONACONTACTOValue(const aValue: String);
begin
DataTable.Fields[idx_ALMACENESPERSONACONTACTO].AsString := aValue;
end;
function TALMACENESDataTableRules.GetOBSERVACIONESValue: IROStrings;
begin
result := NewROStrings();
result.Text := DataTable.Fields[idx_ALMACENESOBSERVACIONES].AsString;
end;
procedure TALMACENESDataTableRules.SetOBSERVACIONESValue(const aValue: IROStrings);
begin
DataTable.Fields[idx_ALMACENESOBSERVACIONES].AsString := aValue.Text;
end;
initialization
RegisterDataTableRules(RID_ALMACENES, TALMACENESDataTableRules);
end.