1470 lines
50 KiB
Plaintext
1470 lines
50 KiB
Plaintext
{
|
|
-----------------------------------------------------------------------
|
|
PROGRAMA : ADPRMT011
|
|
OBJETIVO : Capturar, Modificar, Eliminar registros de la
|
|
Tabla de Datos Basicos de la Solicitud de Empleo
|
|
PROGRAMADOR : Ing. Betania Guerrero Perez
|
|
FECHA REALIZACION : Junio 01, 1993
|
|
-----------------------------------------------------------------------
|
|
}
|
|
IMPORT os
|
|
|
|
GLOBALS "adprgb000.4gl"
|
|
DEFINE xus_mod, xus_crea VARCHAR(50),
|
|
extension VARCHAR(10),
|
|
xfech_crea,xfech_mod DATETIME YEAR TO MINUTE,
|
|
familiar_empresa VARCHAR(3),
|
|
familiar_perentesco_emp VARCHAR(50),
|
|
modo_act CHAR(2),
|
|
imagen,doc BYTE,
|
|
filedestino,fr_end STRING,
|
|
res INT,
|
|
pcelular VARCHAR(15),
|
|
cmd VARCHAR(100),
|
|
xsecuencial INT,
|
|
arr_documentos DYNAMIC ARRAY OF RECORD
|
|
sid SMALLINT,
|
|
xdocumento BYTE,
|
|
nombre_archivo VARCHAR(100)
|
|
END RECORD,
|
|
arr_tecnologia DYNAMIC ARRAY OF RECORD
|
|
herramienta VARCHAR(50),
|
|
nivel VARCHAR(50),
|
|
tiempo_experiencia VARCHAR(50)
|
|
END RECORD
|
|
|
|
MAIN
|
|
DEFER INTERRUPT
|
|
CALL ARG_VAL(1) RETURNING usuarios
|
|
CALL ARG_VAL(2) RETURNING clave
|
|
CALL ARG_VAL(3) RETURNING impresor
|
|
CONNECT to "smarmotech" USER usuarios USING clave
|
|
SELECT a.* INTO p_companias.* FROM companias a
|
|
CALL adprmt011()
|
|
END MAIN
|
|
|
|
FUNCTION adprmt011()
|
|
CLEAR SCREEN
|
|
OPTIONS
|
|
FORM LINE 9,
|
|
ERROR LINE 24,
|
|
COMMENT LINE 23
|
|
|
|
OPEN FORM adfmmt011 FROM "adfmmt011"
|
|
DISPLAY FORM adfmmt011
|
|
|
|
DISPLAY "adprmt011" AT 4,3 ATTRIBUTE(RED)
|
|
DISPLAY "Datos Basicos" AT 6,36 ATTRIBUTE(BLACK)
|
|
|
|
MENU
|
|
ON ACTION nuevo
|
|
let int_flag = FALSE
|
|
LET modo_act = "NO"
|
|
INITIALIZE emplea.* TO NULL
|
|
CALL adpcad011()
|
|
ON ACTION buscar
|
|
LET modo_act = "SI"
|
|
let int_flag = false
|
|
CALL adpcmf011()
|
|
ON ACTION Salir
|
|
EXIT MENU
|
|
END MENU
|
|
|
|
END FUNCTION
|
|
|
|
FUNCTION adpcad011()
|
|
# WHENEVER ERROR CONTINUE
|
|
DIALOG ATTRIBUTE (UNBUFFERED)
|
|
INPUT BY NAME
|
|
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.barrio,
|
|
basico.casa_num,
|
|
basico.telefono,
|
|
pcelular,
|
|
basico.urbanizacion,
|
|
basico.tipo_vivienda,
|
|
basico.cod_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.tipo_documento,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.sexo,
|
|
basico.cod_puesto,
|
|
basico.cod_prof,
|
|
basico.ars,
|
|
basico.no_afiliacion,
|
|
basico.afp,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.telefono_contacto_emergencia,
|
|
basico.parentesco_emergencia,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia,
|
|
familiar_empresa,
|
|
familiar_perentesco_emp
|
|
ATTRIBUTE(WITHOUT DEFAULTS)
|
|
BEFORE INPUT
|
|
IF modo_act = "NO" THEN
|
|
LET basico.fecha=TODAY
|
|
END IF
|
|
AFTER FIELD cedula
|
|
IF basico.cedula IS NOT NULL THEN
|
|
IF LENGTH(basico.cedula) <9 THEN
|
|
CALL fgl_winmessage("INFO","LONGITUD CEDULA INCORRECTA","INFO")
|
|
NEXT FIELD cedula
|
|
END IF
|
|
SELECT a.cedula FROM adtb00012 a WHERE a.cedula = basico.cedula AND a.status_t IS null
|
|
IF STATUS <> NOTFOUND THEN
|
|
CALL fgl_winmessage("INFO","YA EXISTE UNA SOLICITUD PARA ESTA PERSONA","INFO")
|
|
NEXT FIELD cedula
|
|
END IF
|
|
SELECT a.cedula FROM adtb00003 a WHERE a.cedula = basico.cedula AND status_t IS NULL
|
|
IF STATUS <> NOTFOUND THEN
|
|
CALL fgl_winmessage("INFO","YA EXISTE UN EMPLEADO CON ESTA CEDULA","INFO")
|
|
NEXT FIELD cedula
|
|
END IF
|
|
|
|
END IF
|
|
ON ACTION nacion
|
|
CALL nacer()
|
|
DISPLAY BY NAME basico.cod_nac,nacion.nom_nac
|
|
ON ACTION provincia
|
|
CALL lugar_nac()
|
|
|
|
DISPLAY BY NAME basico.cod_provincia,
|
|
provincia.nombre_provincia
|
|
ON ACTION puesto
|
|
CALL busca_puesto() RETURNING basico.cod_puesto,puesto.nom_puesto
|
|
DISPLAY BY NAME basico.cod_puesto,puesto.nom_puesto
|
|
ON ACTION profesion
|
|
CALL carrera() RETURNING basico.cod_prof,profesion.nom_prof
|
|
DISPLAY BY NAME basico.cod_prof,profesion.nom_prof
|
|
ON ACTION foto
|
|
LOCATE imagen IN MEMORY
|
|
CALL busca_foto() RETURNING imagen,filedestino
|
|
|
|
DISPLAY filedestino TO foto_solicita
|
|
AFTER FIELD fecha
|
|
IF basico.fecha IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD fecha
|
|
END IF
|
|
|
|
AFTER FIELD sexo
|
|
IF basico.sexo IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD sexo
|
|
END IF
|
|
|
|
AFTER FIELD nom1_sol
|
|
IF basico.nom1_sol IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD nom1_sol
|
|
END IF
|
|
|
|
AFTER FIELD apell1_sol
|
|
IF basico.apell1_sol IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD apell1_sol
|
|
END IF
|
|
|
|
AFTER FIELD calle
|
|
IF basico.calle IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD calle
|
|
END IF
|
|
|
|
AFTER FIELD casa_num
|
|
IF basico.casa_num IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD casa_num
|
|
END IF
|
|
|
|
AFTER FIELD telefono
|
|
IF basico.telefono IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD telefono
|
|
END IF
|
|
|
|
## VERIFICA QUE LA PROVINCIA EXISTA EN EL CATALOGO DE PROVINCIAS
|
|
AFTER FIELD cod_provincia
|
|
IF basico.cod_provincia IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_provincia
|
|
ELSE
|
|
SELECT a.nombre_provincia INTO basico.nombre_provincia
|
|
FROM vetb00020 a
|
|
WHERE a.cod_provincia = basico.cod_provincia and
|
|
a.status_t is null
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_provincia
|
|
END IF
|
|
DISPLAY BY NAME basico.nombre_provincia
|
|
END IF
|
|
|
|
AFTER FIELD fech_nac
|
|
IF basico.fech_nac IS NOT NULL THEN
|
|
IF basico.fech_nac > basico.fecha THEN
|
|
LET numero_msg = 149
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD fech_nac
|
|
END IF
|
|
END IF
|
|
|
|
## VERIFICA QUE LA NACIONALIDAD EXISTA EN EL CATALOGO DE NACIONALIDADES.
|
|
AFTER FIELD cod_nac
|
|
IF basico.cod_nac IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_nac
|
|
ELSE
|
|
SELECT nom_nac INTO nacion.nom_nac FROM adtb00007
|
|
WHERE cod_nac = basico.cod_nac and status_t is null
|
|
|
|
IF status >= 0 THEN
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_nac
|
|
END IF
|
|
ELSE
|
|
|
|
IF bandera = 1 THEN
|
|
CLEAR SCREEN
|
|
RETURN
|
|
END IF
|
|
END IF
|
|
DISPLAY BY NAME nacion.nom_nac
|
|
END IF
|
|
|
|
AFTER FIELD estatura
|
|
IF basico.estatura IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD estatura
|
|
END IF
|
|
|
|
AFTER FIELD peso
|
|
IF basico.peso IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD peso
|
|
END IF
|
|
|
|
## VERIFICA QUE EL PUESTO EXISTA EN EL CATALOGO DE PUESTOS.
|
|
AFTER FIELD cod_puesto
|
|
IF basico.cod_puesto IS NULL THEN
|
|
LET numero_msg = 16
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_puesto
|
|
ELSE
|
|
SELECT a.nom_puesto INTO puesto.nom_puesto FROM adtb00004 a
|
|
WHERE a.cod_puesto = basico.cod_puesto and a.status_t is null
|
|
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_puesto
|
|
END IF
|
|
DISPLAY BY NAME puesto.nom_puesto
|
|
END IF
|
|
|
|
## VERIFICA QUE LA PROFESION EXISTA EN EL CATALOGO DE PROFESIONES.
|
|
AFTER FIELD cod_prof
|
|
IF basico.cod_prof IS NOT NULL THEN
|
|
SELECT a.nom_prof INTO profesion.nom_prof FROM adtb00010 a
|
|
WHERE a.cod_prof = basico.cod_prof and a.status_t is null
|
|
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
NEXT FIELD cod_prof
|
|
END IF
|
|
DISPLAY BY NAME profesion.nom_prof
|
|
END IF
|
|
AFTER INPUT
|
|
IF basico.cedula IS NULL THEN
|
|
CALL msg(16)
|
|
NEXT FIELD cedula
|
|
END IF
|
|
END INPUT
|
|
INPUT ARRAY arridiomas FROM idiomas.* ATTRIBUTE(WITHOUT DEFAULTS)
|
|
END INPUT
|
|
#TECNOLOGIA
|
|
INPUT ARRAY arr_tecnologia FROM stecnologia.* ATTRIBUTE(WITHOUT DEFAULTS)
|
|
END INPUT
|
|
#DOCUMENTOS
|
|
INPUT ARRAY arr_documentos FROM sdocumentos.*
|
|
ON ACTION documentos
|
|
LOCATE arr_documentos[arr_curr()].xdocumento IN MEMORY
|
|
CALL documentacion()
|
|
RETURNING arr_documentos[arr_curr()].nombre_archivo,arr_documentos[arr_curr()].xdocumento
|
|
ON ACTION abrir
|
|
|
|
IF arr_documentos[arr_curr()].nombre_archivo IS NOT NULL THEN
|
|
CALL arr_documentos[arr_curr()].xdocumento.writeFile(arr_documentos[arr_curr()].nombre_archivo)
|
|
LET extension = os.Path.extension(arr_documentos[arr_curr()].nombre_archivo)
|
|
LET filedestino = "tmpfile.",extension CLIPPED
|
|
CALL fgl_putfile(arr_documentos[arr_curr()].nombre_archivo,filedestino)
|
|
|
|
|
|
DISPLAY "FILE ",fr_end clipped," file dest ",filedestino
|
|
CALL ui.Interface.frontCall( "standard", "shellexec", [filedestino], [res] )
|
|
DISPLAY "msg ",res
|
|
END IF
|
|
END INPUT
|
|
INPUT ARRAY ARR_REF FROM referencia.*
|
|
|
|
END INPUT
|
|
|
|
INPUT ARRAY arr_educa FROM educacion.*
|
|
BEFORE ROW
|
|
LET cuenta_educa = arr_curr()
|
|
AFTER FIELD cod_educa
|
|
IF arr_educa[cuenta_educa].cod_educa IS NOT NULL THEN
|
|
SELECT a.nom_prof INTO arr_educa[cuenta_educa].nom_educa
|
|
FROM adtb00010 a
|
|
WHERE a.cod_prof = arr_educa[cuenta_educa].cod_educa AND
|
|
a.status_t IS NULL
|
|
IF STATUS = NOTFOUND THEN
|
|
CALL msg(3)
|
|
NEXT FIELD cod_educa
|
|
ELSE
|
|
DISPLAY arr_educa[cuenta_educa].nom_educa TO educacion[scr_line()].nom_educa
|
|
|
|
END IF
|
|
END IF
|
|
ON ACTION carrera
|
|
CALL carrera() RETURNING arr_educa[cuenta_educa].cod_educa,arr_educa[cuenta_educa].nom_educa
|
|
|
|
AFTER INPUT
|
|
END INPUT
|
|
|
|
|
|
INPUT ARRAY arr_familiares FROM parentesco.*
|
|
BEFORE INPUT
|
|
CALL cparentesco()
|
|
AFTER FIELD fechaf
|
|
IF arr_familiares[arr_curr()].fechaF IS NOT NULL THEN
|
|
LET arr_familiares[arr_curr()].edad = ( TODAY-arr_familiares[arr_curr()].fechaF )/365
|
|
DISPLAY arr_familiares[arr_curr()].edad TO parentesco[scr_line()].edad
|
|
ELSE
|
|
LET arr_familiares[arr_curr()].edad = NULL
|
|
DISPLAY arr_familiares[arr_curr()].edad TO parentesco[scr_line()].edad
|
|
|
|
END IF
|
|
AFTER INPUT
|
|
LET cuenta_familia = arr_count()
|
|
END INPUT
|
|
INPUT ARRAY arrexperiencia FROM experiencia.*
|
|
END INPUT
|
|
ON ACTION actualizar
|
|
IF basico.cedula IS NULL THEN
|
|
CALL msg(16)
|
|
NEXT FIELD cedula
|
|
END IF
|
|
{BUSCA SECUENCIA SOLICITANTE }
|
|
|
|
## SI NO OCURRE NINGUN ERROR SE PROCEDE A INSERTAR EL REGISTRO
|
|
BEGIN WORK
|
|
|
|
IF modo_act = "NO" THEN
|
|
|
|
SELECT a.num_trx INTO ultimo FROM adtb00028 a WHERE a.clave = "SL"
|
|
IF STATUS = NOTFOUND THEN
|
|
INSERT INTO adtb00028 (num_trx,clave) VALUES (0,"SL")
|
|
END IF
|
|
IF ultimo IS NULL THEN
|
|
LET ultimo = 0
|
|
END IF
|
|
LET basico.cod_Sol = ultimo + 1
|
|
## SE ACTUALIZA LA TABLA DE NUMERACION AUTOMATICA PARA LA SOLICITUD DE EMPLEO
|
|
UPDATE adtb00028 SET adtb00028.num_trx = basico.cod_sol
|
|
WHERE adtb00028.clave = "SL"
|
|
IF imagen IS NULL THEN
|
|
LOCATE imagen IN MEMORY
|
|
END IF
|
|
INSERT INTO adtb00012 (
|
|
cod_sol,
|
|
fecha,
|
|
nom1_sol,
|
|
nom2_sol,
|
|
apell1_sol,
|
|
apell2_sol,
|
|
calle,
|
|
casa_num,
|
|
barrio,
|
|
urbanizacion,
|
|
telefono,
|
|
celular,
|
|
cod_provincia,
|
|
fech_nac,
|
|
cod_nac,
|
|
estado_civil,
|
|
estatura,
|
|
peso,
|
|
tipo_documento,
|
|
cedula,
|
|
licencia,
|
|
tipo_sangre,
|
|
cod_puesto,
|
|
cod_prof,
|
|
sexo,
|
|
afp,
|
|
ars,
|
|
numero_nss,
|
|
seguro_complementario,
|
|
categoria_licencia_conducir,
|
|
sueldo_deseado,
|
|
pariente_emergencia,
|
|
telefono_contacto_emergencia,
|
|
parentesco_emergencia,
|
|
us_crea,
|
|
fech_crea,
|
|
familiar_emp,
|
|
familiar_parentesco,
|
|
vehiculo_propio ,
|
|
email ,
|
|
cuenta_bancaria ,
|
|
tipo_vivienda ,
|
|
banco ,
|
|
arrestado ,
|
|
motivo_arresto ,
|
|
sometido_justicia ,
|
|
motivo_sometido_justicia,
|
|
foto_solicitante,
|
|
no_afiliacion
|
|
)
|
|
VALUES (
|
|
basico.cod_sol,
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.casa_num,
|
|
basico.barrio,
|
|
basico.urbanizacion,
|
|
basico.telefono,
|
|
pcelular,
|
|
basico.cod_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.tipo_documento,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.cod_puesto,
|
|
basico.cod_prof,
|
|
basico.sexo,
|
|
basico.afp,
|
|
basico.ars,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.telefono_contacto_emergencia,
|
|
basico.parentesco_emergencia,
|
|
usuarios,
|
|
GETDATE (),
|
|
familiar_empresa,
|
|
familiar_perentesco_emp,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.tipo_vivienda ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia,
|
|
imagen ,
|
|
basico.no_afiliacion
|
|
|
|
)
|
|
|
|
ELSE
|
|
SELECT a.cedula FROM adtb00012 a WHERE a.cedula = basico.cedula
|
|
IF STATUS <> NOTFOUND THEN
|
|
UPDATE adtb00012 SET nom1_sol = basico.nom1_sol,
|
|
nom2_sol = basico.nom2_sol,
|
|
apell1_sol = basico.apell1_sol,
|
|
apell2_sol = basico.apell2_sol,
|
|
calle = basico.calle,
|
|
casa_num = basico.casa_num,
|
|
barrio = basico.barrio,
|
|
urbanizacion = basico.urbanizacion,
|
|
telefono = basico.telefono,
|
|
cod_provincia = basico.cod_provincia,
|
|
fech_nac = basico.fech_nac,
|
|
cod_nac = basico.cod_nac,
|
|
estado_civil = basico.estado_civil,
|
|
peso = basico.peso,
|
|
estatura = basico.estatura,
|
|
licencia = basico.licencia,
|
|
tipo_sangre = basico.tipo_sangre,
|
|
vehiculo_propio = basico.vehiculo_propio,
|
|
email = basico.email ,
|
|
cuenta_bancaria = basico.cuenta_bancaria ,
|
|
tipo_vivienda = basico.tipo_vivienda ,
|
|
banco = basico.banco ,
|
|
arrestado = basico.arrestado ,
|
|
motivo_arresto = basico.motivo_arresto ,
|
|
sometido_justicia = basico.sometido_justicia ,
|
|
motivo_sometido_justicia = basico.motivo_sometido_justicia,
|
|
no_afiliacion = basico.no_afiliacion,
|
|
telefono_contacto_emergencia = basico.telefono_contacto_emergencia,
|
|
cod_puesto = basico.cod_puesto,
|
|
cod_prof = basico.cod_prof,
|
|
us_mod =usuarios,
|
|
fech_mod = GETDATE(),
|
|
pariente_emergencia = basico.pariente_emergencia,
|
|
parentesco_emergencia= basico.parentesco_emergencia ,
|
|
foto_solicitante = imagen,
|
|
celular = pcelular,
|
|
sexo = basico.sexo
|
|
WHERE cod_sol = basico.cod_sol
|
|
ELSE
|
|
UPDATE adtb00012 SET nom1_sol = basico.nom1_sol,
|
|
nom2_sol = basico.nom2_sol,
|
|
apell1_sol = basico.apell1_sol,
|
|
apell2_sol = basico.apell2_sol,
|
|
calle = basico.calle,
|
|
casa_num = basico.casa_num,
|
|
barrio = basico.barrio,
|
|
urbanizacion = basico.urbanizacion,
|
|
telefono = basico.telefono,
|
|
cod_provincia = basico.cod_provincia,
|
|
fech_nac = basico.fech_nac,
|
|
cod_nac = basico.cod_nac,
|
|
estado_civil = basico.estado_civil,
|
|
peso = basico.peso,
|
|
cedula = basico.cedula,
|
|
estatura = basico.estatura,
|
|
licencia = basico.licencia,
|
|
tipo_sangre = basico.tipo_sangre,
|
|
vehiculo_propio = basico.vehiculo_propio,
|
|
email = basico.email ,
|
|
cuenta_bancaria = basico.cuenta_bancaria ,
|
|
tipo_vivienda = basico.tipo_vivienda ,
|
|
banco = basico.banco ,
|
|
arrestado = basico.arrestado ,
|
|
motivo_arresto = basico.motivo_arresto ,
|
|
sometido_justicia = basico.sometido_justicia ,
|
|
motivo_sometido_justicia = basico.motivo_sometido_justicia,
|
|
telefono_contacto_emergencia = basico.telefono_contacto_emergencia,
|
|
no_afiliacion = basico.no_afiliacion,
|
|
cod_puesto = basico.cod_puesto,
|
|
cod_prof = basico.cod_prof,
|
|
us_mod =usuarios,
|
|
fech_mod = GETDATE(),
|
|
pariente_emergencia = basico.pariente_emergencia,
|
|
parentesco_emergencia= basico.parentesco_emergencia,
|
|
celular = pcelular,
|
|
sexo = basico.sexo
|
|
WHERE cod_sol = basico.cod_sol
|
|
END IF
|
|
END IF
|
|
## DATOS FAMILIARES
|
|
|
|
DELETE FROM adtb00013 WHERE cod_sol = basico.cod_sol
|
|
|
|
FOR idx = 1 TO arr_familiares.getLength()
|
|
INSERT INTO adtb00013
|
|
(cod_sol
|
|
,cod_par
|
|
,sec_par
|
|
,nombre
|
|
,cedula
|
|
,sexo
|
|
,telefono
|
|
,fecha_nac
|
|
,us_crea
|
|
,fech_crea,
|
|
edad,
|
|
ocupacion
|
|
)
|
|
|
|
VALUES(basico.cod_sol,arr_familiares[idx].cod_par,0,
|
|
arr_familiares[idx].nombreF,arr_familiares[idx].cedulaF,
|
|
arr_familiares[idx].sexof,arr_familiares[idx].ftelefono,
|
|
arr_familiares[idx].fechaF,
|
|
SUSER_SNAME(),GETDATE(),arr_familiares[idx].edad,
|
|
arr_familiares[idx].ocupacion
|
|
)
|
|
END FOR
|
|
|
|
# REFERENCIAS PERSONALES
|
|
DELETE FROM adtb00014 WHERE cod_sol = basico.cod_sol
|
|
FOR idx = 1 TO arr_ref.getLength()
|
|
IF arr_ref[idx].nom_ref IS NOT NULL THEN
|
|
INSERT INTO adtb00014 (secuencia,cod_sol,nom_ref,anos_rel,telefono,calle,casa_num,parentesco,urbanizacion,us_crea,fech_Crea)
|
|
VALUES (idx,basico.cod_sol,arr_ref[idx].nom_ref,arr_ref[idx].anos_rel,arr_ref[idx].telefonope,
|
|
arr_ref[idx].callepe,arr_ref[idx].casa_numpe,arr_ref[idx].ref_parentesco, arr_ref[idx].urbanizacionpe,usuarios,getdate())
|
|
END IF
|
|
END FOR
|
|
|
|
# INSERTA IDIOMAS
|
|
DELETE FROM adtb00043 WHERE cod_sol = basico.cod_sol
|
|
FOR idx = 1 TO arridiomas.getLength()
|
|
IF arridiomas[idx].idioma1 IS NOT NULL THEN
|
|
DISPLAY "idioma u ",arridiomas[idx].idioma1
|
|
INSERT INTO adtb00043 (cod_sol,idioma,habla,escribe,lee,otros_idioma,id)
|
|
VALUES (basico.cod_sol,arridiomas[idx].idioma1,arridiomas[idx].h_idioma,
|
|
arridiomas[idx].e_idioma,arridiomas[idx].l_idioma,arridiomas[idx].otros_idiomas,idx)
|
|
END IF
|
|
END FOR
|
|
## TECNOLOGIA
|
|
DELETE FROM adtb00050 WHERE cod_sol = basico.cod_sol
|
|
FOR idx = 1 TO arr_tecnologia.getLength()
|
|
|
|
INSERT INTO adtb00050 (cod_sol,herramienta,nivel,tiempo_experiencia)
|
|
VALUES (basico.cod_sol,arr_tecnologia[idx].*)
|
|
END FOR
|
|
## ACTUALIZA REFERENCIA
|
|
DELETE FROM adtb00015 WHERE cod_sol = basico.cod_sol
|
|
FOR idx = 1 TO arrexperiencia.getLength()
|
|
IF arrexperiencia[idx].nombre_empresa IS NOT NULL THEN
|
|
INSERT INTO adtb00015 (cod_sol,nom_inst,calle,urbanizacion,puesto,fecha_inicio,fecha_termino,
|
|
sueldo,observacion,us_crea,fech_Crea,contacto,puesto_contacto,
|
|
email,url,telefono)
|
|
VALUES (basico.cod_sol,arrexperiencia[idx].nombre_empresa,arrexperiencia[idx].calle,arrexperiencia[idx].urbanizacion,
|
|
arrexperiencia[idx].puesto,arrexperiencia[idx].fecha_inicio,arrexperiencia[idx].fecha_termino,
|
|
arrexperiencia[idx].sueldo,arrexperiencia[idx].observacion, usuarios,getdate(),
|
|
arrexperiencia[idx].contacto,arrexperiencia[idx].puesto_contacto,arrexperiencia[idx].email_laboral,
|
|
arrexperiencia[idx].url,arrexperiencia[idx].telefono_empresa)
|
|
|
|
|
|
END IF
|
|
END FOR
|
|
#ACTUALIZA EDUCACION
|
|
DELETE FROM adtb00047 WHERE cod_sol = basico.cod_sol
|
|
FOR idx = 1 TO arr_educa.getLength()
|
|
IF arr_educa[idx].nom_inst IS NOT NULL THEN
|
|
INSERT INTO adtb00047
|
|
(cod_sol
|
|
,nombre_institucion
|
|
,calle
|
|
,casa_num
|
|
,urbanizacion
|
|
,cod_educa
|
|
,duracion
|
|
,ano_termino,
|
|
descripcion_curso,
|
|
modalidad)
|
|
VALUES
|
|
(basico.cod_sol,
|
|
arr_educa[idx].nom_inst
|
|
,arr_educa[idx].calleE
|
|
,arr_educa[idx].casa_numE
|
|
,arr_educa[idx].urbanizacionE
|
|
,arr_educa[idx].cod_educa
|
|
,arr_educa[idx].anosE
|
|
,arr_educa[idx].ano_termE
|
|
,arr_educa[idx].descripcion_curso
|
|
,arr_educa[idx].mdalidad)
|
|
|
|
|
|
|
|
END IF
|
|
END FOR
|
|
#DOCUMENTOS SOLICITANTE
|
|
DELETE FROM adtb00049 WHERE cod_sol = basico.cod_sol
|
|
FOR idx = 1 TO arr_documentos.getLength()
|
|
IF arr_documentos[idx].nombre_archivo IS NOT NULL THEN
|
|
|
|
INSERT INTO adtb00049 VALUES (basico.cod_sol,idx,arr_documentos[idx].nombre_archivo,
|
|
arr_documentos[idx].xdocumento)
|
|
END IF
|
|
END FOR
|
|
COMMIT WORK
|
|
LET numero_msg = 1
|
|
CALL msg(numero_msg)
|
|
CLEAR FORM
|
|
INITIALIZE basico.* TO NULL
|
|
CALL arridiomas.clear()
|
|
CALL arrexperiencia.clear()
|
|
CALL arr_familiares.clear()
|
|
CALL arr_educa.clear()
|
|
CALL arr_ref.clear()
|
|
NEXT FIELD nom1_sol
|
|
|
|
|
|
ON ACTION CANCEL
|
|
{ IF os.Path.exists(filedestino) THEN
|
|
LET cmd = "DEL ",filedestino
|
|
RUN cmd
|
|
END IF }
|
|
LET INT_FLAG = FALSE
|
|
CALL arr_documentos.clear()
|
|
CALL arr_educa.clear()
|
|
CALL arrexperiencia.clear()
|
|
CLEAR FORM
|
|
RETURN
|
|
|
|
END DIALOG
|
|
END FUNCTION
|
|
|
|
FUNCTION adpcmf011()
|
|
## AQUI SE PREPARA PARA LA CAPTURA DEL CRITERIO DE SELECCION PARA LA
|
|
## MODIFICACION DE REGISTROS.
|
|
|
|
# WHENEVER ERROR CONTINUE
|
|
|
|
DIALOG ATTRIBUTE (FIELD ORDER FORM,UNBUFFERED)
|
|
CONSTRUCT criterio ON a.cod_sol,a.nom1_sol,a.nom2_sol,a.apell1_sol,a.apell2_sol,a.cedula,a.cod_puesto,a.cod_prof,a.sexo,a.cod_nac
|
|
FROM cod_sol,nom1_sol,nom2_sol,apell1_sol,apell2_sol,cedula,cod_puesto,cod_prof,sexo,cod_nac
|
|
ON ACTION nacion
|
|
CALL nacer()
|
|
DISPLAY BY NAME basico.cod_nac,nacion.nom_nac
|
|
ON ACTION provincia
|
|
CALL lugar_nac()
|
|
|
|
DISPLAY BY NAME basico.cod_provincia,
|
|
provincia.nombre_provincia
|
|
ON ACTION puesto
|
|
CALL busca_puesto() RETURNING basico.cod_puesto,puesto.nom_puesto
|
|
DISPLAY BY NAME basico.cod_puesto,puesto.nom_puesto
|
|
ON ACTION profesion
|
|
CALL carrera() RETURNING basico.cod_prof,profesion.nom_prof
|
|
DISPLAY BY NAME basico.cod_prof,profesion.nom_prof
|
|
|
|
ON ACTION busca
|
|
|
|
LET SELEC =
|
|
"SELECT a.cod_sol,CONVERT(char(10),a.fecha,103),a.nom1_sol,a.nom2_sol,a.apell1_sol,a.apell2_sol, ",
|
|
" a.calle,a.casa_num,a.barrio,a.urbanizacion,a.telefono,a.cod_provincia,c.nombre_provincia, ",
|
|
" a.fech_nac,a.cod_nac,b.nom_nac,a.estado_civil,a.estatura,a.peso,a.cedula, ",
|
|
" a.licencia,a.tipo_sangre, ",
|
|
" a.cod_puesto,d.nom_puesto,a.cod_prof,e.nom_prof,a.sexo, a.afp,a.ars, a.numero_nss,a.seguro_complementario, ",
|
|
" a.categoria_licencia_conducir,a.sueldo_deseado,a.pariente_emergencia,a.parentesco_emergencia, ",
|
|
" a.familiar_emp,a.familiar_parentesco, ",
|
|
" a.vehiculo_propio,a.email,a.cuenta_bancaria,a.tipo_vivienda,a.banco,a.arrestado,a.motivo_arresto ,
|
|
a.sometido_justicia,a.motivo_sometido_justicia,a.tipo_documento,a.us_crea,a.fech_crea,a.us_mod,a.fech_mod,a.status_t, ",
|
|
" a.foto_solicitante,a.celular,a.no_afiliacion,a.telefono_contacto_emergencia ",
|
|
"FROM adtb00012 a LEFT OUTER JOIN adtb00004 d ON a.cod_puesto = d.cod_puesto LEFT OUTER JOIN adtb00007 b ON a.cod_nac = b.cod_nac ",
|
|
" LEFT OUTER JOIN vetb00020 c ON a.cod_provincia = c.cod_provincia LEFT OUTER JOIN adtb00010 e ON a.cod_prof = e.cod_prof ",
|
|
" WHERE a.status_t is null and ",
|
|
criterio clipped,
|
|
" ORDER BY a.cod_sol"
|
|
|
|
PREPARE busca FROM selec
|
|
DECLARE datos SCROLL CURSOR FOR busca
|
|
OPEN datos
|
|
|
|
LOCATE imagen IN MEMORY
|
|
FETCH FIRST datos INTO
|
|
basico.cod_sol,
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.casa_num,
|
|
basico.barrio,
|
|
basico.urbanizacion,
|
|
basico.telefono,
|
|
basico.cod_provincia,
|
|
basico.nombre_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.nom_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.cod_puesto ,
|
|
basico.nom_puesto,
|
|
basico.cod_prof,
|
|
basico.nom_prof,
|
|
basico.sexo,
|
|
basico.afp,
|
|
basico.ars,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.parentesco_emergencia,
|
|
familiar_empresa,
|
|
familiar_perentesco_emp,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.tipo_vivienda ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia ,
|
|
basico.tipo_documento,
|
|
xus_crea,xfech_crea,xus_mod,xfech_mod,descr,imagen,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
|
|
|
|
|
|
|
|
IF STATUS = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
RETURN
|
|
END IF
|
|
DISPLAY BY NAME basico.*,
|
|
xus_crea,xfech_crea,xus_mod,xfech_mod,
|
|
descr,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
DISPLAY imagen TO foto_solicita
|
|
CALL busca_idiomas()
|
|
|
|
NEXT FIELD idioma1
|
|
END CONSTRUCT
|
|
|
|
DISPLAY ARRAY arridiomas TO idiomas.*
|
|
ON ACTION siguiente
|
|
FETCH NEXT datos INTO
|
|
basico.cod_sol,
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.casa_num,
|
|
basico.barrio,
|
|
basico.urbanizacion,
|
|
basico.telefono,
|
|
basico.cod_provincia,
|
|
basico.nombre_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.nom_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.cod_puesto ,
|
|
basico.nom_puesto,
|
|
basico.cod_prof,
|
|
basico.nom_prof,
|
|
basico.sexo,
|
|
basico.afp,
|
|
basico.ars,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.parentesco_emergencia,
|
|
familiar_empresa,
|
|
familiar_perentesco_emp,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.tipo_vivienda ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
|
|
|
|
|
|
|
|
|
|
IF STATUS = NOTFOUND THEN
|
|
LET numero_msg = -1309
|
|
CALL msg(numero_msg)
|
|
END IF
|
|
|
|
IF basico.estado_civil = "S" THEN
|
|
LET descr = "SOLTERO"
|
|
END IF
|
|
IF basico.estado_civil = "C" THEN
|
|
LET descr = "CASADO"
|
|
END IF
|
|
|
|
DISPLAY BY NAME basico.*,descr,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
DISPLAY imagen TO foto_solicita
|
|
|
|
CALL busca_idiomas()
|
|
DISPLAY ARRAY arr_familiares TO parentesco.*
|
|
END DISPLAY
|
|
DISPLAY ARRAY arrexperiencia TO experiencia.*
|
|
END DISPLAY
|
|
DISPLAY ARRAY arr_educa TO educacion.*
|
|
END DISPLAY
|
|
|
|
ON ACTION primero
|
|
FETCH FIRST datos INTO
|
|
basico.cod_sol,
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.casa_num,
|
|
basico.barrio,
|
|
basico.urbanizacion,
|
|
basico.telefono,
|
|
basico.cod_provincia,
|
|
basico.nombre_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.nom_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.cod_puesto ,
|
|
basico.nom_puesto,
|
|
basico.cod_prof,
|
|
basico.nom_prof,
|
|
basico.sexo,
|
|
basico.afp,
|
|
basico.ars,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.parentesco_emergencia,
|
|
familiar_empresa,
|
|
familiar_perentesco_emp,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.tipo_vivienda ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
|
|
|
|
|
|
|
|
IF basico.estado_civil = "S" THEN
|
|
LET descr = "SOLTERO"
|
|
END IF
|
|
IF basico.estado_civil = "C" THEN
|
|
LET descr = "CASADO"
|
|
END IF
|
|
|
|
DISPLAY BY NAME basico.*,descr,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
DISPLAY imagen TO foto_solicita
|
|
|
|
CALL busca_idiomas()
|
|
DISPLAY ARRAY arridiomas TO idiomas.*
|
|
END DISPLAY
|
|
DISPLAY ARRAY arr_educa TO educacion.*
|
|
END DISPLAY
|
|
|
|
ON ACTION ultimo
|
|
FETCH LAST datos INTO
|
|
basico.cod_sol,
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.casa_num,
|
|
basico.barrio,
|
|
basico.urbanizacion,
|
|
basico.telefono,
|
|
basico.cod_provincia,
|
|
basico.nombre_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.nom_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.cod_puesto ,
|
|
basico.nom_puesto,
|
|
basico.cod_prof,
|
|
basico.nom_prof,
|
|
basico.sexo,
|
|
basico.afp,
|
|
basico.ars,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.parentesco_emergencia,
|
|
familiar_empresa,
|
|
familiar_perentesco_emp,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.tipo_vivienda ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
|
|
|
|
|
|
|
|
IF STATUS = NOTFOUND THEN
|
|
LET numero_msg = 19
|
|
CALL msg(numero_msg)
|
|
|
|
END IF
|
|
|
|
IF basico.estado_civil = "S" THEN
|
|
LET descr = "SOLTERO"
|
|
END IF
|
|
IF basico.estado_civil = "C" THEN
|
|
LET descr = "CASADO"
|
|
END IF
|
|
|
|
DISPLAY BY NAME basico.*,descr,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
DISPLAY imagen TO foto_solicita
|
|
|
|
CALL busca_idiomas()
|
|
DISPLAY ARRAY arridiomas TO idiomas.*
|
|
END DISPLAY
|
|
DISPLAY ARRAY arr_educa TO educacion.*
|
|
END DISPLAY
|
|
|
|
ON ACTION anterior
|
|
FETCH PREVIOUS datos INTO
|
|
basico.cod_sol,
|
|
basico.fecha,
|
|
basico.nom1_sol,
|
|
basico.nom2_sol,
|
|
basico.apell1_sol,
|
|
basico.apell2_sol,
|
|
basico.calle,
|
|
basico.casa_num,
|
|
basico.barrio,
|
|
basico.urbanizacion,
|
|
basico.telefono,
|
|
basico.cod_provincia,
|
|
basico.nombre_provincia,
|
|
basico.fech_nac,
|
|
basico.cod_nac,
|
|
basico.nom_nac,
|
|
basico.estado_civil,
|
|
basico.estatura,
|
|
basico.peso,
|
|
basico.cedula,
|
|
basico.licencia,
|
|
basico.tipo_sangre,
|
|
basico.cod_puesto ,
|
|
basico.nom_puesto,
|
|
basico.cod_prof,
|
|
basico.nom_prof,
|
|
basico.sexo,
|
|
basico.afp,
|
|
basico.ars,
|
|
basico.numero_nss,
|
|
basico.seguro_complementario,
|
|
basico.categoria_licencia_conducir,
|
|
basico.sueldo_deseado,
|
|
basico.pariente_emergencia,
|
|
basico.parentesco_emergencia,
|
|
familiar_empresa,
|
|
familiar_perentesco_emp,
|
|
basico.vehiculo_propio ,
|
|
basico.email ,
|
|
basico.cuenta_bancaria ,
|
|
basico.tipo_vivienda ,
|
|
basico.banco ,
|
|
basico.arrestado ,
|
|
basico.motivo_arresto ,
|
|
basico.sometido_justicia ,
|
|
basico.motivo_sometido_justicia,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
|
|
|
|
|
|
IF STATUS = NOTFOUND THEN
|
|
LET numero_msg = -1309
|
|
CALL msg(numero_msg)
|
|
END IF
|
|
|
|
IF basico.estado_civil = "S" THEN
|
|
LET descr = "SOLTERO"
|
|
END IF
|
|
IF basico.estado_civil = "C" THEN
|
|
LET descr = "CASADO"
|
|
END IF
|
|
|
|
DISPLAY BY NAME basico.*,descr,
|
|
pcelular,basico.no_afiliacion,basico.telefono_contacto_emergencia
|
|
DISPLAY imagen TO foto_solicita
|
|
|
|
CALL busca_idiomas()
|
|
DISPLAY ARRAY arridiomas TO idiomas.*
|
|
END DISPLAY
|
|
DISPLAY ARRAY arr_educa TO educacion.*
|
|
END DISPLAY
|
|
|
|
ON ACTION modificar
|
|
|
|
CALL adpcad011()
|
|
|
|
|
|
|
|
## AQUI SE ELIMINA LA SOLICITUD DE EMPLEO COMPLETA
|
|
ON ACTION eliminar
|
|
UPDATE adtb00012 SET status_t = "E",us_mod=usuarios,fech_mod = getdate() WHERE cod_sol = basico.cod_sol
|
|
UPDATE adtb00013 SET status_t = "E",us_mod=usuarios,fech_mod = getdate() WHERE cod_sol = basico.cod_sol
|
|
|
|
UPDATE adtb00015 SET status_t = "E",us_mod=usuarios,fech_mod = getdate() WHERE cod_sol = basico.cod_sol
|
|
UPDATE adtb00016 SET status_t = "E",us_mod=usuarios,fech_mod = getdate() WHERE cod_sol = basico.cod_sol
|
|
|
|
LET numero_msg = 39
|
|
CALL msg(numero_msg)
|
|
END DISPLAY
|
|
ON ACTION CANCEL
|
|
CALL arr_educa.clear()
|
|
CALL arrexperiencia.clear()
|
|
CALL arridiomas.clear()
|
|
CALL arr_familiares.clear()
|
|
{ IF os.Path.exists(filedestino) THEN
|
|
LET cmd = "DEL ",filedestino
|
|
RUN cmd
|
|
END IF}
|
|
CLEAR FORM
|
|
RETURN
|
|
|
|
|
|
END DIALOG
|
|
END FUNCTION
|
|
|
|
## VENTANA DE LAS PROVINCIAS DEL PAIS.
|
|
FUNCTION lugar_nac()
|
|
OPEN WINDOW busqueda1 AT 10,10 WITH FORM "adfmwd003"
|
|
ATTRIBUTE (BORDER,FORM LINE FIRST + 2, comment line last)
|
|
CONSTRUCT criterio ON nombre_provincia
|
|
FROM nombre_provincia
|
|
IF INT_FLAG THEN
|
|
CLOSE WINDOW busqueda1
|
|
LET INT_FLAG = FALSE
|
|
RETURN
|
|
END IF
|
|
LET selec1 = "SELECT cod_provincia,nombre_provincia FROM vetb00020 ",
|
|
" WHERE ",
|
|
" status_t is null AND ",
|
|
criterio clipped,
|
|
"ORDER BY 1"
|
|
|
|
PREPARE busca1 FROM selec1
|
|
DECLARE local1 CURSOR FOR busca1
|
|
|
|
LET idx = 1
|
|
FOREACH local1 INTO busca_prov[idx].*
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
EXIT FOREACH
|
|
END IF
|
|
|
|
LET despl_prov[idx].cod_provincia = busca_prov[idx].cod_provincia
|
|
LET despl_prov[idx].nombre_provincia = busca_prov[idx].nombre_provincia clipped
|
|
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
|
|
CALL set_count(idx-1)
|
|
DISPLAY ARRAY despl_prov TO s_provincia.*
|
|
LET curr = arr_curr()
|
|
LET basico.cod_provincia = despl_prov[curr].cod_provincia
|
|
LET basico.nombre_provincia = despl_prov[curr].nombre_provincia
|
|
|
|
CLOSE WINDOW busqueda1
|
|
|
|
END FUNCTION
|
|
|
|
## VENTANA DE LAS PROFESIONES
|
|
|
|
|
|
## VENTANA DE LAS NACIONALIDADES
|
|
FUNCTION nacer()
|
|
OPEN WINDOW busqueda3 AT 10,10 WITH FORM "adfmwd013"
|
|
ATTRIBUTE (BORDER,FORM LINE FIRST + 2, comment line last)
|
|
CONSTRUCT criterio ON nom_nac FROM nom_nac
|
|
|
|
LET selec3 = "SELECT cod_nac,nom_nac FROM adtb00007 ",
|
|
" WHERE ",
|
|
" status_t is null AND ",
|
|
criterio clipped,
|
|
"ORDER BY 1 "
|
|
|
|
PREPARE busca3 FROM selec3
|
|
DECLARE local3 CURSOR FOR busca3
|
|
|
|
LET idx = 1
|
|
FOREACH local3 INTO busca_nac[idx].*
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
EXIT FOREACH
|
|
END IF
|
|
|
|
LET despl_nac[idx].cod_nac = busca_nac[idx].cod_nac
|
|
LET despl_nac[idx].nom_nac = busca_nac[idx].nom_nac clipped
|
|
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
|
|
CALL set_count(idx-1)
|
|
DISPLAY ARRAY despl_nac TO s_nacion.*
|
|
LET curr = arr_curr()
|
|
LET basico.cod_nac = despl_nac[curr].cod_nac
|
|
LET nacion.nom_nac = despl_nac[curr].nom_nac
|
|
|
|
CLOSE WINDOW busqueda3
|
|
END FUNCTION
|
|
FUNCTION carrera()
|
|
OPEN WINDOW busqueda2 AT 10,10 WITH FORM "adfmwd010"
|
|
ATTRIBUTE (BORDER,FORM LINE FIRST + 2, comment line last)
|
|
CONSTRUCT criterio ON adtb00010.nom_prof FROM adtb00010.nom_prof
|
|
|
|
LET selec2 = "SELECT cod_prof,nom_prof FROM adtb00010 ",
|
|
" WHERE ",
|
|
" status_t is null AND ",
|
|
criterio clipped,
|
|
"ORDER BY 1 "
|
|
|
|
PREPARE busca2 FROM selec2
|
|
DECLARE local2 CURSOR FOR busca2
|
|
|
|
LET idx = 1
|
|
FOREACH local2 INTO busca_prof[idx].*
|
|
IF status = NOTFOUND THEN
|
|
LET numero_msg = 3
|
|
CALL msg(numero_msg)
|
|
EXIT FOREACH
|
|
END IF
|
|
|
|
LET despl_prof[idx].cod_prof = busca_prof[idx].cod_prof
|
|
LET despl_prof[idx].nom_prof = busca_prof[idx].nom_prof clipped
|
|
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
|
|
CALL set_count(idx-1)
|
|
DISPLAY ARRAY despl_prof TO s_profesion.*
|
|
AFTER DISPLAY
|
|
LET curr = arr_curr()
|
|
EXIT DISPLAY
|
|
|
|
END DISPLAY
|
|
CLOSE WINDOW busqueda2
|
|
RETURN despl_prof[curr].cod_prof,despl_prof[curr].nom_prof
|
|
|
|
END FUNCTION
|
|
|
|
FUNCTION busca_idiomas()
|
|
|
|
DECLARE b_idiomas CURSOR FOR
|
|
SELECT a.idioma,a.habla,a.lee,a.escribe,a.otros_idioma FROM adtb00043 a
|
|
WHERE a.cod_sol = basico.cod_sol
|
|
|
|
LET idx = 1
|
|
FOREACH b_idiomas INTO arridiomas[idx].idioma1,arridiomas[idx].h_idioma,
|
|
arridiomas[idx].l_idioma,
|
|
arridiomas[idx].e_idioma,arridiomas[idx].otros_idiomas
|
|
|
|
LET IDX = IDX +1
|
|
|
|
END FOREACH
|
|
DECLARE b_familiares CURSOR FOR
|
|
SELECT a.cod_par,a.nombre,a.cedula,a.sexo,a.fecha_nac,a.telefono,a.edad,a.ocupacion FROM adtb00013 a
|
|
WHERE a.cod_sol = basico.cod_sol
|
|
LET idx = 1
|
|
FOREACH b_familiares INTO arr_familiares[idx].cod_par,
|
|
arr_familiares[idx].nombreF,
|
|
arr_familiares[idx].cedulaF,
|
|
arr_familiares[idx].sexof,
|
|
arr_familiares[idx].fechaF,
|
|
arr_familiares[idx].ftelefono,
|
|
arr_familiares[idx].edad,
|
|
arr_familiares[idx].ocupacion
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
DECLARE b_experiencia CURSOR FOR
|
|
SELECT a.nom_inst,a.calle,a.urbanizacion,
|
|
a.puesto,a.fecha_inicio,a.fecha_termino,
|
|
a.sueldo,a.observacion
|
|
FROM adtb00015 a
|
|
WHERE a.cod_sol = basico.cod_sol
|
|
|
|
LET idx = 1
|
|
FOREACH b_experiencia INTO arrexperiencia[idx].nombre_empresa,
|
|
arrexperiencia[idx].calle,
|
|
arrexperiencia[idx].urbanizacion,
|
|
arrexperiencia[idx].puesto,
|
|
arrexperiencia[idx].fecha_inicio,
|
|
arrexperiencia[idx].fecha_termino,
|
|
arrexperiencia[idx].sueldo,
|
|
arrexperiencia[idx].observacion
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
#REFERENCIAS PERSONALES
|
|
DECLARE b_ex_personales CURSOR FOR
|
|
SELECT a.secuencia,a.nom_ref,a.parentesco,a.anos_rel,a.telefono,a.calle,a.casa_num,a.urbanizacion
|
|
FROM adtb00014 a
|
|
WHERE a.cod_sol = basico.cod_sol
|
|
ORDER BY a.secuencia
|
|
|
|
LET idx = 1
|
|
FOREACH b_ex_personales INTO arr_ref[idx].*
|
|
LET idx = idx +1
|
|
END FOREACH
|
|
# EDUCACION
|
|
DECLARE b_educacion CURSOR FOR
|
|
SELECT a.nombre_institucion,a.calle,a.casa_num,a.urbanizacion,a.cod_educa,b.nom_prof,
|
|
a.duracion,a.ano_termino,a.descripcion_curso,a.modalidad
|
|
FROM adtb00047 a,adtb00010 b
|
|
WHERE a.cod_educa = b.cod_prof AND
|
|
a.cod_sol = basico.cod_sol
|
|
|
|
#jean marcos simon(849)315-4210
|
|
LET idx = 1
|
|
FOREACH b_educacion INTO arr_educa[idx].nom_inst,arr_educa[idx].calleE,
|
|
arr_educa[idx].casa_numE,arr_educa[idx].urbanizacionE,
|
|
arr_educa[idx].cod_educa,
|
|
arr_educa[idx].nom_educa,arr_educa[idx].anosE,
|
|
arr_educa[idx].ano_termE,
|
|
arr_educa[idx].descripcion_curso,
|
|
arr_educa[idx].mdalidad
|
|
|
|
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
## TECNOLOGIA
|
|
DECLARE tecno CURSOR FOR
|
|
SELECT a.herramienta,a.nivel,a.tiempo_experiencia,a.id FROM adtb00050 a
|
|
WHERE a.cod_sol = basico.cod_sol
|
|
ORDER BY a.id
|
|
|
|
LET idx = 1
|
|
FOREACH tecno INTO arr_tecnologia[idx].*
|
|
LET idx = idx + 1
|
|
END FOREACH
|
|
# FOTO SOLICITANTE
|
|
SELECT a.secuencia INTO xsecuencial FROM adtb00048 a
|
|
IF xsecuencial IS NULL THEN
|
|
LET xsecuencial = 0
|
|
END IF
|
|
LET xsecuencial = xsecuencial+1
|
|
LET filedestino = xsecuencial USING "&&&&&&",".jpg"
|
|
CALL imagen.writeFile(filedestino)
|
|
DISPLAY filedestino TO foto_solicita
|
|
# DOCUMENTOS SOLICITANTE
|
|
DECLARE b_documentos CURSOR FOR
|
|
SELECT a.id,a.nombre_file,a.binario FROM adtb00049 a
|
|
WHERE a.cod_sol = basico.cod_sol
|
|
|
|
LOCATE arr_documentos[1].xdocumento IN MEMORY
|
|
LET idx = 1
|
|
FOREACH b_documentos INTO arr_documentos[idx].sid,
|
|
arr_documentos[idx].nombre_archivo,
|
|
arr_documentos[idx].xdocumento
|
|
LET idx = idx +1
|
|
LOCATE arr_documentos[idx].xdocumento IN MEMORY
|
|
END FOREACH
|
|
END FUNCTION
|
|
FUNCTION cparentesco()
|
|
DEFINE ccod_par ui.ComboBox,
|
|
descripcion VARCHAR(30),
|
|
kcod_par SMALLINT
|
|
|
|
LET ccod_par =ui.combobox.forname("formonly.cod_par")
|
|
|
|
DECLARE busca_par CURSOR FOR
|
|
SELECT a.cod_par,a.desc_par FROM adtb00025 a
|
|
ORDER BY a.desc_par
|
|
|
|
FOREACH busca_par INTO kcod_par,descripcion
|
|
CALL ccod_par.addItem(kcod_par,descripcion)
|
|
END FOREACH
|
|
END FUNCTION
|
|
FUNCTION documentacion()
|
|
DEFINE imagenom,filepath,filedestino STRING,
|
|
doc_emp BYTE,
|
|
xsecuencia INT,
|
|
extension VARCHAR(10),
|
|
acciones CHAR(2)
|
|
|
|
|
|
SELECT a.secuencia INTO xsecuencia FROM adtb00048 a
|
|
IF xsecuencia IS NULL THEN
|
|
LET xsecuencia = 0
|
|
END IF
|
|
LET xsecuencia = xsecuencia +1
|
|
UPDATE adtb00048 SET secuencia = xsecuencia
|
|
|
|
LET imagenom = "*.jpg"
|
|
CALL ui.interface.frontcall("standard","openfile",[imagenom,"jpg","png jpg bmp gif pdf","Busca Documento"],filepath)
|
|
IF filepath IS NOT NULL THEN
|
|
LET extension = os.Path.extension(filepath)
|
|
LOCATE doc_Emp IN MEMORY
|
|
|
|
LET filedestino = xsecuencia USING "&&&&&&",extension CLIPPED
|
|
CALL fgl_getfile(filepath,filedestino)
|
|
CALL doc_emp.readFile(filedestino)
|
|
LET imagenom = os.Path.basename(filepath)
|
|
END IF
|
|
|
|
RETURN imagenom,doc_emp
|
|
END FUNCTION |