Diferencia entre revisiones de «TpAUX CAMPO CONSTRAINT unit»
Ir a la navegación
Ir a la búsqueda
Sin resumen de edición |
|||
Línea 66: | Línea 66: | ||
published | published | ||
end; | end; | ||
</pre> | |||
=Modo de uso= | |||
El auxiliar se usa de la siguiente manera (ejemplo de [[TprxADODataSetEdit]].OnExitFieldXtd): | |||
<pre> | |||
prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.DataSet := Self; | |||
prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.Clase := ppTableName; | |||
prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.Campo := aFieldName; | |||
prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.Procesar; | |||
</pre> | |||
Primero asignamos las propiedades: | |||
*'''Dataset''' que se asigna al mismo componente que está llamando al auxiliar. | |||
*'''Clase''' se inicializa al nombre de la tabla del componente que está llamando al auxiliar. | |||
*'''Campo''' se inicializa al nombre del campo cuyo valor queremos asignar. | |||
Posteriormente se llama directamente a la función Procesar. | |||
<pre> | |||
prxADOClientDM.pAUX_CAMPO_ASIGNACION_unit.Procesar(TpAUX_CAMPO_ASIGNACION_ONEXIT); | |||
</pre> | </pre> |
Revisión del 18:03 22 may 2025
Descripción
El objeto TpAUX_CAMPO_CONSTRAINT_unit (Constricciones de campos) procesa los auxiliares de tipo CONSTRAINT, ver detalles en DEV AUXILIARES/CONSTRAINT.
Identidad
- Ancestro: TComponent
- Carpeta: C:\DevelopPrx\pPRAGMA
- Archivo: pAUX_CAMPO_CONSTRAINT_unit.pas
Declaración
type TpAUX_CAMPO_CONSTRAINT_unit = class(TComponent) private FDataSet: TDataSet; FClase: String; FCampo: String; FQuery: TprxADOQuery; FSQL_COMANDO: TStringList; FSQL_COMANDO_SELECT: TStringList; FSQL_MENSAJE: TStringList; FPrepared: Boolean; FTipo: String; FEsSQL: Boolean; FTag_Porcentaje100: Boolean; FSolucion: String; FItems: TStringList; FMinimo: Variant; FMaximo: Variant; FMensaje: String; protected property SQL_COMANDO: TStringList read FSQL_COMANDO write FSQL_COMANDO; property SQL_MENSAJE: TStringList read FSQL_MENSAJE write FSQL_MENSAJE; property EsSQL: Boolean read FEsSQL; property Tag_Porcentaje100: Boolean read FTag_Porcentaje100; property Minimo: Variant read FMinimo; property Maximo: Variant read FMaximo; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; function EsTipo_ENUMERACION: Boolean; function EsTipo_FILTRO: Boolean; function EsTipo_LIMITE: Boolean; function Exists: Boolean; function Prepare: String; function Validate(var aMsg: String): Boolean; property DataSet: TDataSet read FDataSet write FDataSet; property Clase: String read FClase write FClase; property Campo: String read FCampo write FCampo; property Query: TprxADOQuery read FQuery write FQuery; property Prepared: Boolean read FPrepared; property Solucion: String read FSolucion; property Items: TStringList read FItems; property Mensaje: String read FMensaje; property SQL_COMANDO_SELECT: TStringList read FSQL_COMANDO_SELECT write FSQL_COMANDO_SELECT; published end;
Modo de uso
El auxiliar se usa de la siguiente manera (ejemplo de TprxADODataSetEdit.OnExitFieldXtd):
prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.DataSet := Self; prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.Clase := ppTableName; prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.Campo := aFieldName; prxADOClientDM.pAUX_CAMPO_CONDICIONEDICION_unit.Procesar;
Primero asignamos las propiedades:
- Dataset que se asigna al mismo componente que está llamando al auxiliar.
- Clase se inicializa al nombre de la tabla del componente que está llamando al auxiliar.
- Campo se inicializa al nombre del campo cuyo valor queremos asignar.
Posteriormente se llama directamente a la función Procesar.
prxADOClientDM.pAUX_CAMPO_ASIGNACION_unit.Procesar(TpAUX_CAMPO_ASIGNACION_ONEXIT);