git-svn-id: https://192.168.0.254/svn/Proyectos.LuisLeon_FactuGES2/trunk@101 b2cfbe5a-eba1-4a0c-8b32-7feea0a119f2
457 lines
17 KiB
ObjectPascal
457 lines
17 KiB
ObjectPascal
unit schInformesClient_Intf;
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, DB, schBase_Intf, SysUtils, uROClasses, uDAInterfaces, 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_Informes = '{C65EAF59-D0EA-4C35-A56A-7F14CD82D7E6}';
|
|
|
|
{ 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)
|
|
['{1E7345FD-9E8F-4F1F-94AF-4329A77BA594}']
|
|
{ Property getters and setters }
|
|
function GetIDValue: Integer;
|
|
procedure SetIDValue(const aValue: Integer);
|
|
function GetIDIsNull: Boolean;
|
|
procedure SetIDIsNull(const aValue: Boolean);
|
|
function GetID_EMPRESAValue: Integer;
|
|
procedure SetID_EMPRESAValue(const aValue: Integer);
|
|
function GetID_EMPRESAIsNull: Boolean;
|
|
procedure SetID_EMPRESAIsNull(const aValue: Boolean);
|
|
function GetCATEGORIAValue: String;
|
|
procedure SetCATEGORIAValue(const aValue: String);
|
|
function GetCATEGORIAIsNull: Boolean;
|
|
procedure SetCATEGORIAIsNull(const aValue: Boolean);
|
|
function GetCONTROLLERValue: String;
|
|
procedure SetCONTROLLERValue(const aValue: String);
|
|
function GetCONTROLLERIsNull: Boolean;
|
|
procedure SetCONTROLLERIsNull(const aValue: Boolean);
|
|
function GetMODIFICABLEValue: String;
|
|
procedure SetMODIFICABLEValue(const aValue: String);
|
|
function GetMODIFICABLEIsNull: Boolean;
|
|
procedure SetMODIFICABLEIsNull(const aValue: Boolean);
|
|
function GetICONOValue: Integer;
|
|
procedure SetICONOValue(const aValue: Integer);
|
|
function GetICONOIsNull: Boolean;
|
|
procedure SetICONOIsNull(const aValue: Boolean);
|
|
function GetNOMBREValue: String;
|
|
procedure SetNOMBREValue(const aValue: String);
|
|
function GetNOMBREIsNull: Boolean;
|
|
procedure SetNOMBREIsNull(const aValue: Boolean);
|
|
function GetDESCRIPCIONValue: String;
|
|
procedure SetDESCRIPCIONValue(const aValue: String);
|
|
function GetDESCRIPCIONIsNull: Boolean;
|
|
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
|
|
function GetORDENValue: Integer;
|
|
procedure SetORDENValue(const aValue: Integer);
|
|
function GetORDENIsNull: Boolean;
|
|
procedure SetORDENIsNull(const aValue: Boolean);
|
|
function GetVISTAValue: IROStrings;
|
|
function GetVISTAIsNull: Boolean;
|
|
procedure SetVISTAIsNull(const aValue: Boolean);
|
|
function GetTIPO_AGRUPACIONValue: Integer;
|
|
procedure SetTIPO_AGRUPACIONValue(const aValue: Integer);
|
|
function GetTIPO_AGRUPACIONIsNull: Boolean;
|
|
procedure SetTIPO_AGRUPACIONIsNull(const aValue: Boolean);
|
|
|
|
|
|
{ Properties }
|
|
property ID: Integer read GetIDValue write SetIDValue;
|
|
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
|
|
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
|
|
property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
|
|
property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue;
|
|
property CATEGORIAIsNull: Boolean read GetCATEGORIAIsNull write SetCATEGORIAIsNull;
|
|
property CONTROLLER: String read GetCONTROLLERValue write SetCONTROLLERValue;
|
|
property CONTROLLERIsNull: Boolean read GetCONTROLLERIsNull write SetCONTROLLERIsNull;
|
|
property MODIFICABLE: String read GetMODIFICABLEValue write SetMODIFICABLEValue;
|
|
property MODIFICABLEIsNull: Boolean read GetMODIFICABLEIsNull write SetMODIFICABLEIsNull;
|
|
property ICONO: Integer read GetICONOValue write SetICONOValue;
|
|
property ICONOIsNull: Boolean read GetICONOIsNull write SetICONOIsNull;
|
|
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
|
|
property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull;
|
|
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
|
|
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
|
|
property ORDEN: Integer read GetORDENValue write SetORDENValue;
|
|
property ORDENIsNull: Boolean read GetORDENIsNull write SetORDENIsNull;
|
|
property VISTA: IROStrings read GetVISTAValue;
|
|
property VISTAIsNull: Boolean read GetVISTAIsNull write SetVISTAIsNull;
|
|
property TIPO_AGRUPACION: Integer read GetTIPO_AGRUPACIONValue write SetTIPO_AGRUPACIONValue;
|
|
property TIPO_AGRUPACIONIsNull: Boolean read GetTIPO_AGRUPACIONIsNull write SetTIPO_AGRUPACIONIsNull;
|
|
end;
|
|
|
|
{ TInformesDataTableRules }
|
|
TInformesDataTableRules = class(TIntfObjectDADataTableRules, IInformes)
|
|
private
|
|
f_VISTA: IROStrings;
|
|
procedure VISTA_OnChange(Sender: TObject);
|
|
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 GetID_EMPRESAValue: Integer; virtual;
|
|
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
|
|
function GetID_EMPRESAIsNull: Boolean; virtual;
|
|
procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual;
|
|
function GetCATEGORIAValue: String; virtual;
|
|
procedure SetCATEGORIAValue(const aValue: String); virtual;
|
|
function GetCATEGORIAIsNull: Boolean; virtual;
|
|
procedure SetCATEGORIAIsNull(const aValue: Boolean); virtual;
|
|
function GetCONTROLLERValue: String; virtual;
|
|
procedure SetCONTROLLERValue(const aValue: String); virtual;
|
|
function GetCONTROLLERIsNull: Boolean; virtual;
|
|
procedure SetCONTROLLERIsNull(const aValue: Boolean); virtual;
|
|
function GetMODIFICABLEValue: String; virtual;
|
|
procedure SetMODIFICABLEValue(const aValue: String); virtual;
|
|
function GetMODIFICABLEIsNull: Boolean; virtual;
|
|
procedure SetMODIFICABLEIsNull(const aValue: Boolean); virtual;
|
|
function GetICONOValue: Integer; virtual;
|
|
procedure SetICONOValue(const aValue: Integer); virtual;
|
|
function GetICONOIsNull: Boolean; virtual;
|
|
procedure SetICONOIsNull(const aValue: Boolean); virtual;
|
|
function GetNOMBREValue: String; virtual;
|
|
procedure SetNOMBREValue(const aValue: String); virtual;
|
|
function GetNOMBREIsNull: Boolean; virtual;
|
|
procedure SetNOMBREIsNull(const aValue: Boolean); virtual;
|
|
function GetDESCRIPCIONValue: String; virtual;
|
|
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
|
|
function GetDESCRIPCIONIsNull: Boolean; virtual;
|
|
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
|
|
function GetORDENValue: Integer; virtual;
|
|
procedure SetORDENValue(const aValue: Integer); virtual;
|
|
function GetORDENIsNull: Boolean; virtual;
|
|
procedure SetORDENIsNull(const aValue: Boolean); virtual;
|
|
function GetVISTAValue: IROStrings; virtual;
|
|
function GetVISTAIsNull: Boolean; virtual;
|
|
procedure SetVISTAIsNull(const aValue: Boolean); virtual;
|
|
function GetTIPO_AGRUPACIONValue: Integer; virtual;
|
|
procedure SetTIPO_AGRUPACIONValue(const aValue: Integer); virtual;
|
|
function GetTIPO_AGRUPACIONIsNull: Boolean; virtual;
|
|
procedure SetTIPO_AGRUPACIONIsNull(const aValue: Boolean); virtual;
|
|
|
|
{ Properties }
|
|
property ID: Integer read GetIDValue write SetIDValue;
|
|
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
|
|
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
|
|
property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
|
|
property CATEGORIA: String read GetCATEGORIAValue write SetCATEGORIAValue;
|
|
property CATEGORIAIsNull: Boolean read GetCATEGORIAIsNull write SetCATEGORIAIsNull;
|
|
property CONTROLLER: String read GetCONTROLLERValue write SetCONTROLLERValue;
|
|
property CONTROLLERIsNull: Boolean read GetCONTROLLERIsNull write SetCONTROLLERIsNull;
|
|
property MODIFICABLE: String read GetMODIFICABLEValue write SetMODIFICABLEValue;
|
|
property MODIFICABLEIsNull: Boolean read GetMODIFICABLEIsNull write SetMODIFICABLEIsNull;
|
|
property ICONO: Integer read GetICONOValue write SetICONOValue;
|
|
property ICONOIsNull: Boolean read GetICONOIsNull write SetICONOIsNull;
|
|
property NOMBRE: String read GetNOMBREValue write SetNOMBREValue;
|
|
property NOMBREIsNull: Boolean read GetNOMBREIsNull write SetNOMBREIsNull;
|
|
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
|
|
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
|
|
property ORDEN: Integer read GetORDENValue write SetORDENValue;
|
|
property ORDENIsNull: Boolean read GetORDENIsNull write SetORDENIsNull;
|
|
property VISTA: IROStrings read GetVISTAValue;
|
|
property VISTAIsNull: Boolean read GetVISTAIsNull write SetVISTAIsNull;
|
|
property TIPO_AGRUPACION: Integer read GetTIPO_AGRUPACIONValue write SetTIPO_AGRUPACIONValue;
|
|
property TIPO_AGRUPACIONIsNull: Boolean read GetTIPO_AGRUPACIONIsNull write SetTIPO_AGRUPACIONIsNull;
|
|
|
|
public
|
|
constructor Create(aDataTable: TDADataTable); override;
|
|
destructor Destroy; override;
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses Variants, uROBinaryHelpers;
|
|
|
|
{ TInformesDataTableRules }
|
|
constructor TInformesDataTableRules.Create(aDataTable: TDADataTable);
|
|
var
|
|
StrList: TStringList;
|
|
begin
|
|
inherited;
|
|
|
|
StrList := TStringList.Create;
|
|
StrList.OnChange := VISTA_OnChange;
|
|
f_VISTA := NewROStrings(StrList,True);
|
|
end;
|
|
|
|
destructor TInformesDataTableRules.Destroy;
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.VISTA_OnChange(Sender: TObject);
|
|
begin
|
|
if DataTable.Editing then DataTable.Fields[idx_InformesVISTA].AsVariant := TStringList(Sender).Text;
|
|
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.GetIDIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesID].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetIDIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesID].AsVariant := Null;
|
|
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.GetID_EMPRESAIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesID_EMPRESA].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetID_EMPRESAIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesID_EMPRESA].AsVariant := Null;
|
|
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.GetCATEGORIAIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesCATEGORIA].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetCATEGORIAIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesCATEGORIA].AsVariant := Null;
|
|
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.GetCONTROLLERIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesCONTROLLER].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetCONTROLLERIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesCONTROLLER].AsVariant := Null;
|
|
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.GetMODIFICABLEIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesMODIFICABLE].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetMODIFICABLEIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesMODIFICABLE].AsVariant := Null;
|
|
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.GetICONOIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesICONO].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetICONOIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesICONO].AsVariant := Null;
|
|
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.GetNOMBREIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesNOMBRE].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetNOMBREIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesNOMBRE].AsVariant := Null;
|
|
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.GetDESCRIPCIONIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesDESCRIPCION].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesDESCRIPCION].AsVariant := Null;
|
|
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.GetORDENIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesORDEN].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetORDENIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesORDEN].AsVariant := Null;
|
|
end;
|
|
|
|
function TInformesDataTableRules.GetVISTAValue: IROStrings;
|
|
begin
|
|
result := f_VISTA;
|
|
result.Text := DataTable.Fields[idx_InformesVISTA].AsString;
|
|
end;
|
|
|
|
function TInformesDataTableRules.GetVISTAIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesVISTA].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetVISTAIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesVISTA].AsVariant := Null;
|
|
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;
|
|
|
|
function TInformesDataTableRules.GetTIPO_AGRUPACIONIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_InformesTIPO_AGRUPACION].IsNull;
|
|
end;
|
|
|
|
procedure TInformesDataTableRules.SetTIPO_AGRUPACIONIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_InformesTIPO_AGRUPACION].AsVariant := Null;
|
|
end;
|
|
|
|
|
|
initialization
|
|
RegisterDataTableRules(RID_Informes, TInformesDataTableRules);
|
|
|
|
end.
|