protected void Page_Load(object sender, EventArgs e)
    {
        tools _tools = new tools();
        SecureQueryString QueryStringSeguro;
        QueryStringSeguro = new SecureQueryString(_tools.byteParaQueryStringSeguro(), Request["data"]);

        Decimal REGISTRO = Convert.ToDecimal(QueryStringSeguro["registro"]);

        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaPruebaAplicadaYa = _hojasVida.ObtenerSelRegAplicacionPrueebasObtenerPorRegistro(REGISTRO);
        DataRow filaPruebaAplicadaYa = tablaPruebaAplicadaYa.Rows[0];

        Int32 ID_SOLICITUD = Convert.ToInt32(filaPruebaAplicadaYa["ID_SOLICITUD"]);
        radicacionHojasDeVida _radicacionHojasDeVida = new radicacionHojasDeVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaSolicitud = _radicacionHojasDeVida.ObtenerRegSolicitudesingresoPorIdSolicitud(ID_SOLICITUD);
        DataRow filaSolicitud = tablaSolicitud.Rows[0];

        String NOMBRE_ARCHIVO = filaSolicitud["NUM_DOC_IDENTIDAD"].ToString().Trim() + "-PRUEBA-" + filaPruebaAplicadaYa["NOM_PRUEBA"].ToString().Trim();
        NOMBRE_ARCHIVO = NOMBRE_ARCHIVO.Replace(' ','_');

        Response.Clear();
        Response.AddHeader("content-disposition", string.Format("attachment;filename={0}",NOMBRE_ARCHIVO + filaPruebaAplicadaYa["ARCHIVO_EXTENSION"].ToString().Trim()));

        Response.ContentType = filaPruebaAplicadaYa["ARCHIVO_TYPE"].ToString().Trim();

        Response.BinaryWrite((byte[])filaPruebaAplicadaYa["ARCHIVO_PRUEBA"]);

        Response.End();
    }
Пример #2
0
        public Boolean ActualizarFormacionAcademicaEntrevistado(Decimal REGISTRO_ENTREVISTA,
            List<FormacionAcademica> listaFormacionAcademica,
            Conexion conexion)
        {
            Boolean correcto = true;

            hojasVida _hojasVida = new hojasVida(Empresa, Usuario);
            DataTable tablInfoFormacionActual = _hojasVida.ObtenerSelRegInformacionAcademicaFormalYNoFormal(REGISTRO_ENTREVISTA, conexion);

            Boolean registroEncontrado = false;

            foreach (DataRow filaFormacionActual in tablInfoFormacionActual.Rows)
            {
                registroEncontrado = false;

                Decimal ID_INFO_ACADEMICA_ACTUAL = Convert.ToDecimal(filaFormacionActual["ID_INFO_ACADEMICA"]);

                foreach (FormacionAcademica f in listaFormacionAcademica)
                {
                    if (ID_INFO_ACADEMICA_ACTUAL == f.ID_INFO_ACADEMICA)
                    {
                        registroEncontrado = true;
                        break;
                    }
                }

                if (registroEncontrado == false)
                {
                    if (InhabilitarFormacionAcademicaEntrevista(ID_INFO_ACADEMICA_ACTUAL, conexion) == false)
                    {
                        correcto = false;
                        break;
                    }
                }
            }

            foreach (FormacionAcademica f in listaFormacionAcademica)
            {
                if (f.ID_INFO_ACADEMICA <= 0)
                {
                    Decimal ID_INFO_ACADEMICA = AdicionarFormacionAcademicaEntrevista(REGISTRO_ENTREVISTA, f.TIPO_EDUCACION, f.NIVEL_ACADEMICO, f.INSTITUCION, f.ANNO, f.OBSERVACIONES, f.CURSO, f.DURACION, f.UNIDAD_DURACION, conexion);

                    if (ID_INFO_ACADEMICA <= 0)
                    {
                        correcto = false;
                        break;
                    }
                }
                else
                {
                    if (ActualizarInformacionAcademicaEntrevista(f.ID_INFO_ACADEMICA, f.NIVEL_ACADEMICO, f.INSTITUCION, f.ANNO, f.OBSERVACIONES, f.CURSO, f.DURACION, f.UNIDAD_DURACION, conexion) == false)
                    {
                        correcto = false;
                        break;
                    }
                }
            }

            return correcto;
        }
Пример #3
0
        public Boolean ActualizarExperienciaLaboralEntrevistado(Decimal REGISTRO_ENTREVISTA,
            List<ExperienciaLaboral> listaExperiencialaboral,
            Conexion conexion)
        {
            Boolean correcto = true;

            hojasVida _hojasVida = new hojasVida(Empresa, Usuario);
            DataTable tablInfoExperienciaActual = _hojasVida.ObtenerSelRegExperienciaLaboral(REGISTRO_ENTREVISTA, conexion);

            Boolean registroEncontrado = false;

            foreach (DataRow filaExperienciaActual in tablInfoExperienciaActual.Rows)
            {
                registroEncontrado = false;

                Decimal ID_EXPERIENCIA_ACTUAL = Convert.ToDecimal(filaExperienciaActual["ID_EXPERIENCIA"]);

                foreach (ExperienciaLaboral e in listaExperiencialaboral)
                {
                    if (ID_EXPERIENCIA_ACTUAL == e.ID_EXPERIENCIA)
                    {
                        registroEncontrado = true;
                        break;
                    }
                }

                if (registroEncontrado == false)
                {
                    if (InhabilitarExperienciaLaboralEntrevista(ID_EXPERIENCIA_ACTUAL, conexion) == false)
                    {
                        correcto = false;
                        break;
                    }
                }
            }

            foreach (ExperienciaLaboral e in listaExperiencialaboral)
            {
                if (e.ID_EXPERIENCIA <= 0)
                {
                    Decimal ID_EXPERIRNCIA = AdicionarExperienciaLaboralEntrevista(REGISTRO_ENTREVISTA, e.EMPRESA_CLIENTE, e.CARGO, e.FUNCIONES, e.FECHA_INGRESO, e.FECHA_RETIRO, e.MOTIVO_RETIRO, e.ULTIMO_SALARIO, conexion);

                    if (ID_EXPERIRNCIA <= 0)
                    {
                        correcto = false;
                        break;
                    }
                }
                else
                {
                    if (ActualizarExperienciaLAboralEntrevista(e.ID_EXPERIENCIA, e.EMPRESA_CLIENTE, e.CARGO, e.FUNCIONES, e.FECHA_INGRESO, e.FECHA_RETIRO, e.MOTIVO_RETIRO, e.ULTIMO_SALARIO, conexion) == false)
                    {
                        correcto = false;
                        break;
                    }
                }
            }

            return correcto;
        }
Пример #4
0
        public Boolean ActulizarComposicionFamiliarEntrevista(Decimal REGISTRO_ENTREVISTA,
            List<ComposicionFamiliar> listaComposicionFamiliar,
            Conexion conexion)
        {
            Boolean correcto = true;

            hojasVida _hojasVida = new hojasVida(Empresa, Usuario);
            DataTable tablainfofamiliarActual = _hojasVida.ObtenerSelRegComposicionFamiliar(REGISTRO_ENTREVISTA, conexion);

            Boolean registroEncontrado = false;

            foreach (DataRow filaFamiliarActual in tablainfofamiliarActual.Rows)
            {
                registroEncontrado = false;

                Decimal ID_COMPOSICION_ACTUAL = Convert.ToDecimal(filaFamiliarActual["ID_COMPOSICION"]);

                foreach (ComposicionFamiliar c in listaComposicionFamiliar)
                {
                    if (ID_COMPOSICION_ACTUAL == c.ID_COMPOSICION)
                    {
                        registroEncontrado = true;
                        break;
                    }
                }

                if (registroEncontrado == false)
                {
                    if (InhabilitarComposicionFamiliarEntrevista(ID_COMPOSICION_ACTUAL, conexion) == false)
                    {
                        correcto = false;
                        break;
                    }
                }
            }

            foreach (ComposicionFamiliar c in listaComposicionFamiliar)
            {
                if (c.ID_COMPOSICION <= 0)
                {
                    Decimal ID_COMPOSICION = AdicionarComposicionFamiliarEntrevista(REGISTRO_ENTREVISTA, c.ID_TIPO_FAMILIAR, c.NOMBRES, c.APELLIDOS, c.FECHA_NACIMIENTO, c.PROFESION, c.ID_CIUDAD, c.VIVE_CON_EL, conexion);

                    if (ID_COMPOSICION <= 0)
                    {
                        correcto = false;
                        break;
                    }
                }
                else
                {
                    if (ActualizarComposicionFamiliarEntrevista(c.ID_COMPOSICION, c.ID_TIPO_FAMILIAR, c.NOMBRES, c.APELLIDOS, c.FECHA_NACIMIENTO, c.PROFESION, c.ID_CIUDAD, c.VIVE_CON_EL, conexion) == false)
                    {
                        correcto = false;
                        break;
                    }
                }
            }

            return correcto;
        }
    private void CargarExperienciaLaboral(Decimal ID_ENTREVISTA)
    {
        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaExperiencia = _hojasVida.ObtenerSelRegExperienciaLaboral(ID_ENTREVISTA);

        if (tablaExperiencia.Rows.Count <= 0)
        {
            if (_hojasVida.MensajeError != null)
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hojasVida.MensajeError, Proceso.Error);
            }

            GridView_ExperienciaLaboral.DataSource = null;
            GridView_ExperienciaLaboral.DataBind();
        }
        else
        {
            Cargar_Grilla_ExperienciaLaboral_Desdetabla(tablaExperiencia);
        }
    }
    private void CargarEducacionNoFormal(Decimal ID_ENTREVISTA)
    {
        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaEducacion = _hojasVida.ObtenerSelRegInformacionAcademica(ID_ENTREVISTA, "NO FORMAL");

        if (tablaEducacion.Rows.Count <= 0)
        {
            if (_hojasVida.MensajeError != null)
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hojasVida.MensajeError, Proceso.Error);
            }

            GridView_EducacionNoFormal.DataSource = null;
            GridView_EducacionNoFormal.DataBind();
        }
        else
        {
            Cargar_Grilla_informacionEducativaNoFormal_Desdetabla(tablaEducacion);
        }
    }
    private void CargarComposicionFamiliar(Decimal ID_ENTREVISTA)
    {
        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablainfofamiliar = _hojasVida.ObtenerSelRegComposicionFamiliar(ID_ENTREVISTA);

        if (tablainfofamiliar.Rows.Count <= 0)
        {
            if (_hojasVida.MensajeError != null)
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hojasVida.MensajeError, Proceso.Error);
            }

            GridView_ComposicionFamiliar.DataSource = null;
            GridView_ComposicionFamiliar.DataBind();
        }
        else
        {
            Cargar_Grilla_Composicionfamiliar_Desdetabla(tablainfofamiliar);
        }
    }
    private void Actualizar()
    {
        tools _tools = new tools();

        Decimal ID_ASSESMENT_CENTER = 0;
        if(String.IsNullOrEmpty(HiddenField_ID_ASSESMENT_CENTER.Value) == false)
        {
            ID_ASSESMENT_CENTER = Convert.ToDecimal(HiddenField_ID_ASSESMENT_CENTER.Value);
        }

        String NOMBRE_ASSESMENT = TextBox_NombreAssesment.Text.Trim();
        String DESCRIPCION_ASSESMENT = TextBox_DescripcionAssesment.Text.Trim();

        Boolean ACTIVO = true;
        if (ID_ASSESMENT_CENTER != 0)
        {
            if (DropDownList_EstadoAssesment.SelectedValue == "True")
            {
                ACTIVO = true;
            }
            else
            {
                ACTIVO = false;
            }
        }

        List<CompetenciaAssesment> listaCompetencias = new List<CompetenciaAssesment>();

        for (int i = 0; i < GridView_CompetenciasAssesment.Rows.Count; i++)
        {
            GridViewRow filaGrilla = GridView_CompetenciasAssesment.Rows[i];

            Decimal ID_COMPETENCIA_ASSESMENT = Convert.ToDecimal(GridView_CompetenciasAssesment.DataKeys[i].Values["ID_COMPETENCIA_ASSESMENT"]);
            Decimal ID_ASSESMENT = Convert.ToDecimal(GridView_CompetenciasAssesment.DataKeys[i].Values["ID_ASSESMENT"]);

            DropDownList dropCompetencia = filaGrilla.FindControl("DropDownList_CompetenciaAssesment") as DropDownList;
            Decimal ID_COMPETENCIA = Convert.ToDecimal(dropCompetencia.SelectedValue);

            CompetenciaAssesment competenciaParaLista = new CompetenciaAssesment();

            competenciaParaLista.ACTIVO = ACTIVO;
            competenciaParaLista.ID_ASSESMENT = ID_ASSESMENT;
            competenciaParaLista.ID_COMPETENCIA = ID_COMPETENCIA;
            competenciaParaLista.ID_COMPETENCIA_ASSESMENT = ID_COMPETENCIA_ASSESMENT;

            listaCompetencias.Add(competenciaParaLista);
        }

        Byte[] ARCHIVO_DOCUMENTO = null;
        Int32 ARCHIVO_TAMANO = 0;
        String ARCHIVO_EXTENSION = null;
        String ARCHIVO_TYPE = null;
        if (FileUpload_Archivo.HasFile == true)
        {
            using (BinaryReader reader = new BinaryReader(FileUpload_Archivo.PostedFile.InputStream))
            {
                ARCHIVO_DOCUMENTO = reader.ReadBytes(FileUpload_Archivo.PostedFile.ContentLength);
                ARCHIVO_TAMANO = FileUpload_Archivo.PostedFile.ContentLength;
                ARCHIVO_TYPE = FileUpload_Archivo.PostedFile.ContentType;
                ARCHIVO_EXTENSION = _tools.obtenerExtensionArchivo(FileUpload_Archivo.PostedFile.FileName);
            }
        }

        hojasVida _hojas = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        ID_ASSESMENT_CENTER = _hojas.ActualizarAssesmentCenter(ID_ASSESMENT_CENTER, NOMBRE_ASSESMENT, DESCRIPCION_ASSESMENT, ACTIVO, listaCompetencias, ARCHIVO_DOCUMENTO, ARCHIVO_TAMANO, ARCHIVO_EXTENSION, ARCHIVO_TYPE);

        if (ID_ASSESMENT_CENTER > 0)
        {
            Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "El Assesment Center " + NOMBRE_ASSESMENT + " fue procesado correctamente.", Proceso.Correcto);

            Ocultar(Acciones.Inicio);
            Desactivar(Acciones.Inicio);
            Mostrar(Acciones.Cargar);

            Cargar(ID_ASSESMENT_CENTER);
        }
        else
        {
            Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hojas.MensajeError, Proceso.Error);
        }
    }
        public Decimal AdicionarRegSolicitudesingreso(DateTime FECHA_R,
            String APELLIDOS,
            String NOMBRES,
            String TIP_DOC_IDENTIDAD,
            String NUM_DOC_IDENTIDAD,
            String CIU_CEDULA,
            String LIB_MILITAR,
            String CAT_LIC_COND,
            String DIR_ASPIRANTE,
            String SECTOR,
            String CIU_ASPIRANTE,
            String TEL_ASPIRANTE,
            String SEXO,
            DateTime FCH_NACIMIENTO,
            String ID_GRUPOS_PRIMARIOS,
            int ID_FUENTE,
            String CONDUCTO,
            int NIV_EDUCACION,
            String E_MAIL,
            int ID_AREASINTERES,
            Decimal ASPIRACION_SALARIAL,
            String EXPERIENCIA,
            Decimal ID_OCUPACION,
            String NUCLEO_FORMACION,
            String TALLA_CAMISA,
            String TALLA_PANTALON,
            String TALLA_ZAPATOS,
            int ESTRATO,
            int NRO_HIJOS,
            Boolean C_FMLIA,
            String CEL_ASPIRANTE,
            String ESTADO_CIVIL,
            Int32 ID_PAIS,
            String TIPO_VIVIENDA,
            String FUENTE_CONOCIMIENTO,
            List<FormacionAcademica> listaFormacionAcademica,
            List<ExperienciaLaboral> listaExperiencia,
            List<ComposicionFamiliar> listaComposicionFamiliar,
            String RH)
        {
            Boolean correcto = true;

            Decimal ID_SOLICITUD = 0;

            Conexion conexion = new Conexion(Empresa);
            conexion.IniciarTransaccion();

            try
            {
                ID_SOLICITUD = AdicionarRegistroRegSolicitudIngreso(FECHA_R, APELLIDOS, NOMBRES, TIP_DOC_IDENTIDAD, NUM_DOC_IDENTIDAD, CIU_CEDULA, LIB_MILITAR, CAT_LIC_COND, DIR_ASPIRANTE, SECTOR, CIU_ASPIRANTE, TEL_ASPIRANTE, SEXO, FCH_NACIMIENTO, ID_GRUPOS_PRIMARIOS, ID_FUENTE, CONDUCTO, NIV_EDUCACION, E_MAIL, ID_AREASINTERES, ASPIRACION_SALARIAL, EXPERIENCIA, ID_OCUPACION, NUCLEO_FORMACION, TALLA_CAMISA, TALLA_PANTALON, TALLA_ZAPATOS, ESTRATO, NRO_HIJOS, C_FMLIA, CEL_ASPIRANTE, ESTADO_CIVIL, ID_PAIS, TIPO_VIVIENDA, FUENTE_CONOCIMIENTO, RH, conexion);

                if (ID_SOLICITUD <= 0)
                {
                    conexion.DeshacerTransaccion();
                    correcto = false;
                    ID_SOLICITUD = 0;
                }
                else
                {
                    hojasVida _hoja = new hojasVida(Empresa, Usuario);

                    DataTable tablaEntrevista = _hoja.ObtenerSelRegEntrevistasPorIdSolicitud(ID_SOLICITUD, conexion);

                    if (_hoja.MensajeError != null)
                    {
                        conexion.DeshacerTransaccion();
                        correcto = false;
                        ID_SOLICITUD = 0;
                    }
                    else
                    {
                        Decimal ID_ENTREVISTA;

                        if (tablaEntrevista.Rows.Count <= 0)
                        {
                            ID_ENTREVISTA = _hoja.AdicionarSelRegEntrevistas(ID_SOLICITUD, FECHA_R, "Ninguna", "Ninguna", "Ninguna", "Ninguna", conexion);

                            if (ID_ENTREVISTA <= 0)
                            {
                                conexion.DeshacerTransaccion();
                                correcto = false;
                                ID_SOLICITUD = 0;
                                ID_ENTREVISTA = 0;
                            }
                        }
                        else
                        {
                            DataRow filaEntrevista = tablaEntrevista.Rows[0];
                            ID_ENTREVISTA = Convert.ToDecimal(filaEntrevista["REGISTRO"]);
                        }

                        if (correcto == true)
                        {
                            if (_hoja.ActualizarFormacionAcademicaEntrevistado(ID_ENTREVISTA, listaFormacionAcademica, conexion) == false)
                            {
                                conexion.DeshacerTransaccion();
                                correcto = false;
                                ID_SOLICITUD = 0;
                            }
                            else
                            {
                                if (_hoja.ActualizarExperienciaLaboralEntrevistado(ID_ENTREVISTA, listaExperiencia, conexion) == false)
                                {
                                    conexion.DeshacerTransaccion();
                                    correcto = false;
                                    ID_SOLICITUD = 0;
                                }
                                else
                                {
                                    if (_hoja.ActulizarComposicionFamiliarEntrevista(ID_ENTREVISTA, listaComposicionFamiliar, conexion) == false)
                                    {
                                        conexion.DeshacerTransaccion();
                                        correcto = false;
                                        ID_SOLICITUD = 0;
                                    }
                                }
                            }
                        }
                    }
                }

                if (correcto == true)
                {
                    conexion.AceptarTransaccion();
                }
            }
            catch (Exception ex)
            {
                correcto = false;
                MensajeError = ex.Message;
                ID_SOLICITUD = 0;
            }
            finally
            {
                conexion.Desconectar();
            }

            return ID_SOLICITUD;
        }
    private void Cargar(Decimal ID_SOLICITUD)
    {
        HiddenField_ID_SOLICITUD.Value = ID_SOLICITUD.ToString();

        Decimal ID_ENTREVISTA = 0;

        radicacionHojasDeVida _rad = new radicacionHojasDeVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaSolicitud = _rad.ObtenerRegSolicitudesingresoPorIdSolicitud(Convert.ToInt32(ID_SOLICITUD));
        DataRow filaSolicitud = tablaSolicitud.Rows[0];

        hojasVida _hoja = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaEntrevista = _hoja.ObtenerSelRegEntrevistasPorIdSolicitud(Convert.ToInt32(ID_SOLICITUD));

        if (tablaEntrevista.Rows.Count > 0)
        {
            DataRow filaEntrevista = tablaEntrevista.Rows[0];

            ID_ENTREVISTA = Convert.ToDecimal(filaEntrevista["REGISTRO"]);
        }

        CargarFamilia(filaSolicitud, ID_ENTREVISTA);
    }
    private void cargarGrillaCompetencias()
    {
        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaCompetencias = _hojasVida.ObtenerCompetenciasActivas();

        if (tablaCompetencias.Rows.Count <= 0)
        {
            if (_hojasVida.MensajeError != null)
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hojasVida.MensajeError, Proceso.Error);
            }
            else
            {
                Mostrar(Acciones.Nuevo);
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "No se encontraron competencias configuradas en el diccionario.", Proceso.Advertencia);
            }

            GridView_COMPETENCIAS.DataSource = null;
            GridView_COMPETENCIAS.DataBind();
        }
        else
        {
            Mostrar(Acciones.Cargar);

            CargarGrillaPreguntasDesdeTabla(tablaCompetencias);

            inhabilitarFilasGrilla(GridView_COMPETENCIAS, 2);
        }
    }
    private void Actualizar()
    {
        List<competenciaEntrevista> listaCompetencias = new List<competenciaEntrevista>();
        competenciaEntrevista competenciaParaLista;

        for (int i = 0; i < GridView_COMPETENCIAS.Rows.Count; i++)
        {
            GridViewRow filaGrilla = GridView_COMPETENCIAS.Rows[i];
            competenciaParaLista = new competenciaEntrevista();

            TextBox datoCompetencia = filaGrilla.FindControl("TextBox_COMPETENCIA") as TextBox;
            competenciaParaLista.COMPETENCIA = datoCompetencia.Text;

            TextBox datoDefinicion = filaGrilla.FindControl("TextBox_DEFINICION") as TextBox;
            competenciaParaLista.DEFINICION = datoDefinicion.Text;

            competenciaParaLista.ID_COMPETENCIA = Convert.ToDecimal(GridView_COMPETENCIAS.DataKeys[i].Values["ID_COMPETENCIA"]);

            DropDownList dropArea = filaGrilla.FindControl("DropDownList_AreaCompetencia") as DropDownList;
            competenciaParaLista.AREA = dropArea.SelectedValue;

            listaCompetencias.Add(competenciaParaLista);
        }

        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        Boolean verificador = _hojasVida.ActualizarCompetencias(listaCompetencias);

        if (verificador == false)
        {
            Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hojasVida.MensajeError, Proceso.Error);
        }
        else
        {
            Ocultar(Acciones.Inicio);
            Desactivar(Acciones.Inicio);
            Cargar(Acciones.Inicio);

            Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, "Las competencias utilizadas para relaizar entrevistas, fueron actualizadas correctamente.", Proceso.Correcto);
        }
    }
    private void Cargar_DropCompetenciasActivas(DropDownList drop)
    {
        hojasVida _hoja = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaCompetencias = _hoja.ObtenerCompetenciasActivas();

        if (tablaCompetencias.Rows.Count <= 0)
        {
            if (_hoja.MensajeError != null)
            {
                Informar(Panel_FONDO_MENSAJE, Image_MENSAJE_POPUP, Panel_MENSAJES, Label_MENSAJE, _hoja.MensajeError, Proceso.Error);
            }
        }

        drop.Items.Clear();

        drop.Items.Add(new ListItem("Seleccione...", ""));

        foreach (DataRow filaTable in tablaCompetencias.Rows)
        {
            drop.Items.Add(new ListItem(filaTable["COMPETENCIA"].ToString(), filaTable["ID_COMPETENCIA"].ToString()));
        }

        drop.DataBind();
    }
    private void CargarGrillaCompetenciasDesdeTabla(DataTable tablaCompetencias)
    {
        GridView_CompetenciasAssesment.DataSource = tablaCompetencias;
        GridView_CompetenciasAssesment.DataBind();

        hojasVida _hoja = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        for (int i = 0; i < GridView_CompetenciasAssesment.Rows.Count; i++)
        {
            GridViewRow filaGrilla = GridView_CompetenciasAssesment.Rows[i];
            DataRow filaTabla = tablaCompetencias.Rows[i];

            DropDownList dropComptetencias = filaGrilla.FindControl("DropDownList_CompetenciaAssesment") as DropDownList;
            Cargar_DropCompetenciasActivas(dropComptetencias);

            Label labelDefinicion = filaGrilla.FindControl("Label_DefinicionCompetencia") as Label;
            Label labelArea = filaGrilla.FindControl("Label_AreaCompetencia") as Label;

            if (filaTabla["ID_COMPETENCIA"].ToString() == "0")
            {
                dropComptetencias.SelectedIndex = 0;
                labelArea.Text = "No seleccionada.";
                labelDefinicion.Text = "No seleccionada.";
            }
            else
            {
                DataTable tablaCompetencia = _hoja.ObtenerCompetenciaPorId(Convert.ToDecimal(filaTabla["ID_COMPETENCIA"]));

                DataRow filaCompetencia = tablaCompetencia.Rows[0];

                try
                {
                    dropComptetencias.SelectedValue = filaTabla["ID_COMPETENCIA"].ToString();
                }
                catch
                {
                    dropComptetencias.SelectedIndex = 0;
                }

                labelDefinicion.Text = filaCompetencia["DEFINICION"].ToString();
                labelArea.Text = filaCompetencia["AREA"].ToString();
            }
        }
    }
Пример #15
0
    /// <summary>
    /// HECHO POR CESAR PULIDO
    /// EL DIA 18 DE DICIMEBRE DE 2012
    /// PARA GENERAR LA ENTRVISTA CON O SIN COMPETENCIAS
    /// </summary>
    /// <returns></returns>
    public byte[] GenerarPDFEntrevista(Decimal ID_SOLICITUD, Decimal ID_PERFIL)
    {
        //ok
        tools _tools = new tools();

        radicacionHojasDeVida _radicacionHojasDeVida = new radicacionHojasDeVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaSolicitud = _radicacionHojasDeVida.ObtenerRegSolicitudesingresoPorIdSolicitud(Convert.ToInt32(ID_SOLICITUD));
        DataRow filaSolicitud = tablaSolicitud.Rows[0];

        String NOMBRE_ASPIRANTE = filaSolicitud["NOMBRES"].ToString().Trim() + " " + filaSolicitud["APELLIDOS"].ToString().Trim();

        String DOC_IDENTIDAD_ASPIRANTE = filaSolicitud["TIP_DOC_IDENTIDAD"].ToString().Trim() + " " + filaSolicitud["NUM_DOC_IDENTIDAD"].ToString().Trim();

        int EDAD_ASPIRANTE = 0;
        if (DBNull.Value.Equals(filaSolicitud["FCH_NACIMIENTO"]) == false)
        {
            try
            { EDAD_ASPIRANTE = _tools.ObtenerEdadDesdeFechaNacimiento(Convert.ToDateTime(filaSolicitud["FCH_NACIMIENTO"])); }
            catch { EDAD_ASPIRANTE = 0; }
        }

        String TIPO_VIVIENDA_ASPIRANTE = "Desconocida";
        if(DBNull.Value.Equals(filaSolicitud["TIPO_VIVIENDA"]) == false)
        {
            TIPO_VIVIENDA_ASPIRANTE = filaSolicitud["TIPO_VIVIENDA"].ToString().Trim();
        }

        String CIUDAD_ASPIRANTE = "Desconocida";
        if (DBNull.Value.Equals(filaSolicitud["NOMBRE_CIUDAD"]) == false)
        {
            CIUDAD_ASPIRANTE = filaSolicitud["NOMBRE_CIUDAD"].ToString().Trim();
        }

        String DIRECCION_ASPIRANTE = filaSolicitud["DIR_ASPIRANTE"].ToString().Trim();

        String SECTOR_ASPIRANTE = filaSolicitud["SECTOR"].ToString().Trim();

        String ESTRATO_ASPIRANTE = "Desconocido";
        if (DBNull.Value.Equals(filaSolicitud["ESTRATO"]) == false) { ESTRATO_ASPIRANTE = filaSolicitud["ESTRATO"].ToString().Trim(); }

        String TELEFONOS_ASPIRANTE = filaSolicitud["TEL_ASPIRANTE"].ToString();

        String ASPIRACION_SALARIAL_ASPIRANTE;
        try { ASPIRACION_SALARIAL_ASPIRANTE = Convert.ToInt32(filaSolicitud["ASPIRACION_SALARIAL"]).ToString(); }
        catch { ASPIRACION_SALARIAL_ASPIRANTE = "Desconocido."; }

        String ESTADO_CIVIL = "Desconocido";
        if (DBNull.Value.Equals(filaSolicitud["ESTADO_CIVIL"]) == false)
        {
            ESTADO_CIVIL = filaSolicitud["ESTADO_CIVIL"].ToString().Trim();
        }

        String EMAIL_ASPIRANTE = filaSolicitud["E_MAIL"].ToString().Trim();

        //FEMENINO, MASCULINO
        String SEXO = "Desconocido.";
        String LIBRETA_MILITAR = "Desconocida.";
        if (DBNull.Value.Equals(filaSolicitud["SEXO"]) == false)
        {
            if (filaSolicitud["SEXO"].ToString().ToUpper() == "F")
            {
                SEXO = "Femenino";
                LIBRETA_MILITAR = "No Aplica";
            }
            else
            {
                if (filaSolicitud["SEXO"].ToString().ToUpper() == "M")
                {
                    SEXO = "Masculino";
                    LIBRETA_MILITAR = filaSolicitud["LIB_MILITAR"].ToString();
                }
            }
        }

        //cargo al que aspira el candidato (cargo generico)
        String CARGO_APLICA = "Desconocido";
        Decimal ID_OCUPACION = 0;
        perfil _perfil = new perfil(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaPerfil = new DataTable();
        Decimal ID_ASSESMENT_CENTER = 0;

        if (ID_PERFIL <= 0)
        {
            CARGO_APLICA = "Entrevista por Producción.";
            ID_ASSESMENT_CENTER = 0;
        }
        else
        {
            tablaPerfil = _perfil.ObtenerPorRegistro(ID_PERFIL);
            if (tablaPerfil.Rows.Count <= 0)
            {
                CARGO_APLICA = "Desconocido.";
                ID_ASSESMENT_CENTER = 0;
            }
            else
            {
                DataRow filaPerfil = tablaPerfil.Rows[0];
                try
                {
                    ID_OCUPACION = Convert.ToDecimal(filaPerfil["ID_OCUPACION"]);
                }
                catch
                {
                    ID_OCUPACION = 0;
                }

                if (ID_OCUPACION > 0)
                {
                    cargo _cargo = new cargo(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
                    DataTable tablaOcupacionAspira = _cargo.ObtenerOcupacionPorIdOcupacion(ID_OCUPACION);

                    if (tablaOcupacionAspira.Rows.Count > 0)
                    {
                        DataRow filaOcupacionAspira = tablaOcupacionAspira.Rows[0];
                        CARGO_APLICA = filaOcupacionAspira["NOM_OCUPACION"].ToString().Trim();
                    }
                }

                //DETERMINAMOS SI SE TIENE UN ID_ASSESMENT_CENTER ASOCIADO AL PERFIL
                if(filaPerfil["TIPO_ENTREVISTA"].ToString().Trim() == "A")
                {
                    try
                    {
                        ID_ASSESMENT_CENTER = Convert.ToDecimal(filaPerfil["ID_ASSESMENT_CENTAR"]);
                    }
                    catch
                    {
                        ID_ASSESMENT_CENTER = 0;
                    }
                }
                else
                {
                    ID_ASSESMENT_CENTER = 0;
                }
            }
        }

        //si la entrevista basica existe ya
        hojasVida _hojasVida = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaEntrevista = _hojasVida.ObtenerSelRegEntrevistasPorIdSolicitud(ID_SOLICITUD);

        String FECHA_ENTREVISTA = "Desconocida.";
        String COMPOSICION_FAMILIAR_ASPIRANTE = "Desconocida.";
        String INFO_ACADEMICA_ASPIRANTE = "Desconocida.";
        String EXPERIENCIA_LAB_ASPIRANTE = "Desconocida.";
        String CONCEPTO_GENERAL = "Desconodido.";
        String USUARIO_ENTREVISTADOR = Session["USU_LOG"].ToString();

        Decimal ID_ENTREVISTA = 0;

        if (tablaEntrevista.Rows.Count > 0)
        {
            DataRow filaEntrevista = tablaEntrevista.Rows[0];

            ID_ENTREVISTA = Convert.ToDecimal(filaEntrevista["REGISTRO"]);

            try
            {
                FECHA_ENTREVISTA = Convert.ToDateTime(filaEntrevista["FCH_ENTREVISTA"]).ToShortDateString();
            }
            catch
            {
                FECHA_ENTREVISTA = "Desconocida.";
            }

            COMPOSICION_FAMILIAR_ASPIRANTE = filaEntrevista["COM_C_FAM"].ToString().Trim();
            INFO_ACADEMICA_ASPIRANTE = filaEntrevista["COM_C_ACA"].ToString().Trim();
            EXPERIENCIA_LAB_ASPIRANTE = filaEntrevista["COM_F_LAB"].ToString().Trim();
            CONCEPTO_GENERAL = filaEntrevista["COM_C_GEN"].ToString().Trim();

            if (DBNull.Value.Equals(filaEntrevista["USU_MOD"]) == false)
            {
                USUARIO_ENTREVISTADOR = filaEntrevista["USU_MOD"].ToString().Trim();
            }
            else
            {
                USUARIO_ENTREVISTADOR = filaEntrevista["USU_CRE"].ToString().Trim();
            }
        }

        String NIVEL_ESCOLARIDAD = "Desconocido";
        if (DBNull.Value.Equals(filaSolicitud["NIVEL_ESCOLARIDAD"]) == false)
        {
            if (filaSolicitud["NIVEL_ESCOLARIDAD"].ToString().Trim() == "NO REQUERIDO")
            {
                NIVEL_ESCOLARIDAD = "NO APLICA";
            }
            else
            {
                NIVEL_ESCOLARIDAD = filaSolicitud["NIVEL_ESCOLARIDAD"].ToString().Trim();
            }
        }

        String PROFESION_ASPIRANTE = "Desconocida";
        if (DBNull.Value.Equals(filaSolicitud["ID_NUCLEO_FORMACION"]) == false)
        {
            PROFESION_ASPIRANTE = filaSolicitud["ID_NUCLEO_FORMACION"].ToString().Trim();
        }

        String ESPECIALIZACION_ASPIRANTE = "Desconocida";
        if (DBNull.Value.Equals(filaSolicitud["AREA_INTERES"]) == false)
        {
            ESPECIALIZACION_ASPIRANTE = filaSolicitud["AREA_INTERES"].ToString().Trim().ToUpper();
        }

        String CABEZA_FAMILIA = "Desconocido";
        if (DBNull.Value.Equals(filaSolicitud["C_FMLIA"]) == false)
        {
            if (filaSolicitud["C_FMLIA"].ToString().Trim() == "S")
            {
                CABEZA_FAMILIA = "SI";
            }
            else
            {
                CABEZA_FAMILIA = "NO";
            }
        }

        String NUM_HIJOS = "Desconocido";
        if (DBNull.Value.Equals(filaSolicitud["NRO_HIJOS"]) == false)
        {
            NUM_HIJOS = filaSolicitud["NRO_HIJOS"].ToString().Trim();
        }

        /*
         * Generación del archi de informe de selección
         * Stream con el contenido del pdf.
        */
        String html_encabezado = "<html>";
        html_encabezado += "<head>";
        html_encabezado += "</head>";
        html_encabezado += "<body>";

        String html_pie = "</body>";
        html_pie += "</html>";

        //para el concepto general en entrevista o resultado de competencias.
        String html_concepto = "<div style=\"text-align: left; margin: 0 0 0 20px; text-decoration: underline; font-weight: bold;\">";
        html_concepto += "CONCEPTO DEL ENTREVISTADOR";
        html_concepto += "</div>";
        html_concepto += "<br />";
        html_concepto += "<div style=\"text-align: justify;\">";
        html_concepto += "[CONCEPTO_GENERAL]";
        html_concepto += "</div>";

        //En esta variable cargamos el documento plantilla
        StreamReader archivo_original = new StreamReader(Server.MapPath(@"~\plantillas_reportes\entrevista.htm"));

        String html_formato_entrevista = html_encabezado + archivo_original.ReadToEnd();

        archivo_original.Dispose();
        archivo_original.Close();

        // -----------------------------------
        html_formato_entrevista = html_formato_entrevista.Replace("[CARGO_APLICA]", CARGO_APLICA);
        html_formato_entrevista = html_formato_entrevista.Replace("[FECHA_ENTREVISTA]", FECHA_ENTREVISTA);
        // -----------------------------------

        // -----------------------------------
        html_formato_entrevista = html_formato_entrevista.Replace("[NOMBRE_ASPIRANTE]", NOMBRE_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[DOC_IDENTIDAD_ASPIRANTE]", DOC_IDENTIDAD_ASPIRANTE);

        if (EDAD_ASPIRANTE > 0) { html_formato_entrevista = html_formato_entrevista.Replace("[EDAD_ASPIRANTE]", EDAD_ASPIRANTE.ToString() + " Años."); }
        else { html_formato_entrevista = html_formato_entrevista.Replace("[EDAD_ASPIRANTE]", "Desconocida."); }

        html_formato_entrevista = html_formato_entrevista.Replace("[DIRECCION_ASPIRANTE]", DIRECCION_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[TIPO_VIVIENDA_ASPIRANTE]", TIPO_VIVIENDA_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[CIUDAD_ASPIRANTE]", CIUDAD_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[SECTOR_ASPIRANTE]", SECTOR_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[ESTRATO_ASPIRANTE]", ESTRATO_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[TELEFONOS_ASPIRANTE]", TELEFONOS_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[ASPIRACION_SALARIAL_ASPIRANTE]", ASPIRACION_SALARIAL_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[ESTADO_CIVIL_ASPIRANTE]", ESTADO_CIVIL);

        html_formato_entrevista = html_formato_entrevista.Replace("[EMAIL_ASPIRANTE]", EMAIL_ASPIRANTE);

        html_formato_entrevista = html_formato_entrevista.Replace("[LIBRETA_MILITAR]", LIBRETA_MILITAR);
        // -----------------------------------

        // -----------------------------------
        html_formato_entrevista = html_formato_entrevista.Replace("[COMPOSICION_FAMILIAR_ASPIRANTE]", COMPOSICION_FAMILIAR_ASPIRANTE);
        html_formato_entrevista = html_formato_entrevista.Replace("[INFO_ACADEMICA_ASPIRANTE]", INFO_ACADEMICA_ASPIRANTE);
        html_formato_entrevista = html_formato_entrevista.Replace("[EXPERIENCIA_LAB_ASPIRANTE]", EXPERIENCIA_LAB_ASPIRANTE);
        // -----------------------------------

        // -----------------------------------
        html_formato_entrevista = html_formato_entrevista.Replace("[NIVEL_ESCOLARIDAD]", NIVEL_ESCOLARIDAD);
        html_formato_entrevista = html_formato_entrevista.Replace("[PROFESION_ASPIRANTE]", PROFESION_ASPIRANTE);
        html_formato_entrevista = html_formato_entrevista.Replace("[ESPECIALIZACION_ASPIRANTE]", ESPECIALIZACION_ASPIRANTE);
        html_formato_entrevista = html_formato_entrevista.Replace("[CABEZA_FAMILIA]", CABEZA_FAMILIA);
        html_formato_entrevista = html_formato_entrevista.Replace("[NUM_HIJOS]", NUM_HIJOS);
        // -----------------------------------

        //TABLA DE COMPOSICION FAMILIAR
        String html_tabla_composicion_familiar = "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" align=\"center\" style=\"font-size:8px; line-height:9px;\">";
        html_tabla_composicion_familiar += "<tr>";
        html_tabla_composicion_familiar += "<td width=\"14%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_composicion_familiar += "PARENTESCO";
        html_tabla_composicion_familiar += "</td>";
        html_tabla_composicion_familiar += "<td width=\"25%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_composicion_familiar += "NOMBRES Y APELLIDOS";
        html_tabla_composicion_familiar += "</td>";
        html_tabla_composicion_familiar += "<td width=\"10%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_composicion_familiar += "EDAD";
        html_tabla_composicion_familiar += "</td>";
        html_tabla_composicion_familiar += "<td width=\"20%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_composicion_familiar += "¿A QUÉ SE DEDICA?";
        html_tabla_composicion_familiar += "</td>";
        html_tabla_composicion_familiar += "<td width=\"19%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_composicion_familiar += "VIVE EN";
        html_tabla_composicion_familiar += "</td>";
        html_tabla_composicion_familiar += "<td width=\"12%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_composicion_familiar += "VIVE CON EL CANDIDATO";
        html_tabla_composicion_familiar += "</td>";
        html_tabla_composicion_familiar += "</tr>";

        DataTable tablainfofamiliar = _hojasVida.ObtenerSelRegComposicionFamiliar(ID_ENTREVISTA);

        foreach(DataRow filaComposicion in tablainfofamiliar.Rows)
        {
            html_tabla_composicion_familiar += "<tr>";
            html_tabla_composicion_familiar += "<td width=\"14%\" style=\"text-align:left;\">";
            html_tabla_composicion_familiar += filaComposicion["ID_TIPO_FAMILIAR"].ToString().Trim();
            html_tabla_composicion_familiar += "</td>";
            html_tabla_composicion_familiar += "<td width=\"25%\" style=\"text-align:left;\">";
            html_tabla_composicion_familiar += filaComposicion["NOMBRES"].ToString().Trim() + " " + filaComposicion["APELLIDOS"].ToString().Trim();
            html_tabla_composicion_familiar += "</td>";
            html_tabla_composicion_familiar += "<td width=\"10%\" style=\"text-align:center;\">";
            try
            {
                html_tabla_composicion_familiar += _tools.ObtenerEdadDesdeFechaNacimiento(Convert.ToDateTime(filaComposicion["FECHA_NACIMIENTO"]));
            }
            catch
            {
                html_tabla_composicion_familiar += "Desconocida";
            }
            html_tabla_composicion_familiar += "</td>";
            html_tabla_composicion_familiar += "<td width=\"20%\" style=\"text-align:left;\">";
            html_tabla_composicion_familiar += filaComposicion["PROFESION"].ToString().Trim();
            html_tabla_composicion_familiar += "</td>";
            html_tabla_composicion_familiar += "<td width=\"19%\" style=\"text-align:left;\">";
            if (filaComposicion["ID_CIUDAD"].ToString().Trim() == "EXTRA")
            {
                html_tabla_composicion_familiar += "Extranjero";
            }
            else
            {
                html_tabla_composicion_familiar += filaComposicion["NOMBRE_CIUDAD"].ToString().Trim();
            }
            html_tabla_composicion_familiar += "</td>";
            html_tabla_composicion_familiar += "<td width=\"12%\" style=\"text-align:center;\">";
            if(filaComposicion["VIVE_CON_EL"].ToString().Trim().ToUpper() == "TRUE")
            {
                html_tabla_composicion_familiar += "SI";
            }
            else
            {
                html_tabla_composicion_familiar += "NO";
            }
            html_tabla_composicion_familiar += "</td>";
            html_tabla_composicion_familiar += "</tr>";
        }

        html_tabla_composicion_familiar += "</table>";
        html_formato_entrevista = html_formato_entrevista.Replace("[TABLA_COMPOSICION_FAMILIAR]", html_tabla_composicion_familiar);

        //EDUCACION FORMAL
        String html_tabla_educacion_formal = "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" align=\"center\" style=\"font-size:8px; line-height:9px;\">";
        html_tabla_educacion_formal += "<tr>";
        html_tabla_educacion_formal += "<td width=\"40%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_educacion_formal += "Grado de Instrucción alcanzado:<\br>Especialización, Profesional, Bachiller.";
        html_tabla_educacion_formal += "</td>";
        html_tabla_educacion_formal += "<td width=\"25%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_educacion_formal += "Institución";
        html_tabla_educacion_formal += "</td>";
        html_tabla_educacion_formal += "<td width=\"12%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_educacion_formal += "Año";
        html_tabla_educacion_formal += "</td>";
        html_tabla_educacion_formal += "<td width=\"23%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_educacion_formal += "Observaciones";
        html_tabla_educacion_formal += "</td>";
        html_tabla_educacion_formal += "</tr>";

        DataTable tablaEducacionFormal = _hojasVida.ObtenerSelRegInformacionAcademica(ID_ENTREVISTA, "FORMAL");

        foreach (DataRow filaEducacionFormal in tablaEducacionFormal.Rows)
        {
            html_tabla_educacion_formal += "<tr>";
            html_tabla_educacion_formal += "<td width=\"40%\" style=\"text-align:left;\">";
            html_tabla_educacion_formal += filaEducacionFormal["NOMBRE_NIVEL_ACADEMICO"].ToString().Trim();
            html_tabla_educacion_formal += "</td>";
            html_tabla_educacion_formal += "<td width=\"25%\" style=\"text-align:left;\">";
            html_tabla_educacion_formal += filaEducacionFormal["INSTITUCION"].ToString().Trim();
            html_tabla_educacion_formal += "</td>";
            html_tabla_educacion_formal += "<td width=\"12%\" style=\"text-align:center;\">";
            html_tabla_educacion_formal += filaEducacionFormal["ANNO"].ToString().Trim();
            html_tabla_educacion_formal += "</td>";
            html_tabla_educacion_formal += "<td width=\"23%\" style=\"text-align:justify;\">";
            html_tabla_educacion_formal += filaEducacionFormal["OBSERVACIONES"].ToString().Trim();
            html_tabla_educacion_formal += "</td>";
            html_tabla_educacion_formal += "</tr>";
        }

        html_tabla_educacion_formal += "</table>";
        html_formato_entrevista = html_formato_entrevista.Replace("[TABLA_EDUCACION_FORMAL]", html_tabla_educacion_formal);

        //EDUCACION NO FORMAL
        String html_tabla_educacion_no_formal = "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" align=\"center\" style=\"font-size:8px; line-height:9px;\">";
        html_tabla_educacion_no_formal += "<tr>";
        html_tabla_educacion_no_formal += "<td width=\"40%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_educacion_no_formal += "Cursos libres - Diplomados";
        html_tabla_educacion_no_formal += "</td>";
        html_tabla_educacion_no_formal += "<td width=\"25%\" style=\"text-align:center; font-weight: bold;\">";
        html_tabla_educacion_no_formal += "Institución";
        html_tabla_educacion_no_formal += "</td>";
        html_tabla_educacion_no_formal += "<td width=\"12%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_educacion_no_formal += "Duración";
        html_tabla_educacion_no_formal += "</td>";
        html_tabla_educacion_no_formal += "<td width=\"23%\" style=\"text-align:center; font-weight: bold; \">";
        html_tabla_educacion_no_formal += "Observaciones";
        html_tabla_educacion_no_formal += "</td>";
        html_tabla_educacion_no_formal += "</tr>";

        DataTable tablaEducacionNoFormal = _hojasVida.ObtenerSelRegInformacionAcademica(ID_ENTREVISTA, "NO FORMAL");

        foreach (DataRow filaEducacionNoFormal in tablaEducacionNoFormal.Rows)
        {
            html_tabla_educacion_no_formal += "<tr>";
            html_tabla_educacion_no_formal += "<td width=\"40%\" style=\"text-align:left;\">";
            html_tabla_educacion_no_formal += filaEducacionNoFormal["CURSO"].ToString().Trim();
            html_tabla_educacion_no_formal += "</td>";
            html_tabla_educacion_no_formal += "<td width=\"25%\" style=\"text-align:left;\">";
            html_tabla_educacion_no_formal += filaEducacionNoFormal["INSTITUCION"].ToString().Trim();
            html_tabla_educacion_no_formal += "</td>";
            html_tabla_educacion_no_formal += "<td width=\"12%\" style=\"text-align:center;\">";
            html_tabla_educacion_no_formal += filaEducacionNoFormal["DURACION"].ToString().Trim() + " " + filaEducacionNoFormal["UNIDAD_DURACION"].ToString().Trim();
            html_tabla_educacion_no_formal += "</td>";
            html_tabla_educacion_no_formal += "<td width=\"23%\" style=\"text-align:justify;\">";
            html_tabla_educacion_no_formal += filaEducacionNoFormal["OBSERVACIONES"].ToString().Trim();
            html_tabla_educacion_no_formal += "</td>";
            html_tabla_educacion_no_formal += "</tr>";
        }

        html_tabla_educacion_no_formal += "</table>";
        html_formato_entrevista = html_formato_entrevista.Replace("[TABLA_EDUCACION_NO_FORMAL]", html_tabla_educacion_no_formal);

        //EXPERIENCIA LABORAL
        String html_tabla_experiencia_laboral = "";
        DataTable tablaExperiencia = _hojasVida.ObtenerSelRegExperienciaLaboral(ID_ENTREVISTA);

        Int32 contador = 1;
        foreach (DataRow filaExperienciaLaboral in tablaExperiencia.Rows)
        {
            if (contador == 1)
            {
                html_tabla_experiencia_laboral += "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" align=\"center\" style=\"font-size:8px; line-height:9px;\">";
            }
            else
            {
                html_tabla_experiencia_laboral += "<br><table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" align=\"center\" style=\"font-size:8px; line-height:9px;\">";
            }

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += contador.ToString() + ". EMPRESA:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += filaExperienciaLaboral["EMPRESA"].ToString().Trim();
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "CARGO DESEMPEÑADO:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += filaExperienciaLaboral["CARGO"].ToString().Trim();
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "FUNCIONES REALIZADAS:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += filaExperienciaLaboral["FUNCIONES"].ToString().Trim();
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "FECHA INGRESO:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += Convert.ToDateTime(filaExperienciaLaboral["FECHA_INGRESO"]).ToShortDateString();
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "FECHA RETIRO:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            try
            {
                html_tabla_experiencia_laboral += Convert.ToDateTime(filaExperienciaLaboral["FECHA_RETIRO"]).ToShortDateString();
            }
            catch
            {
                html_tabla_experiencia_laboral += "";
            }
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "TIEMPO TRABAJADO:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            Boolean correcto = true;
            DateTime fechaIngreso;
            DateTime fechaRetiro;
            try
            {
                fechaIngreso = Convert.ToDateTime(filaExperienciaLaboral["FECHA_INGRESO"]);
            }
            catch
            {
                correcto = false;
                fechaIngreso = new DateTime();
            }

            if (correcto == true)
            {
                Boolean conContratoVigente = true;
                try
                {
                    fechaRetiro = Convert.ToDateTime(filaExperienciaLaboral["FECHA_RETIRO"]);
                    conContratoVigente = false;
                }
                catch
                {
                    conContratoVigente = true;
                    fechaRetiro = Convert.ToDateTime(DateTime.Now.ToShortDateString());
                }

                if (fechaRetiro < fechaIngreso)
                {
                    html_tabla_experiencia_laboral += "Error en fechas.";
                }
                else
                {
                    if (conContratoVigente == true)
                    {
                        html_tabla_experiencia_laboral += "Lleva trabajando: " + _tools.DiferenciaFechas(fechaRetiro, fechaIngreso);
                    }
                    else
                    {
                        html_tabla_experiencia_laboral += "Trabajó: " + _tools.DiferenciaFechas(fechaRetiro, fechaIngreso);
                    }
                }
            }
            else
            {
                html_tabla_experiencia_laboral += "Desconocido.";
            }
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "MOTIVO_RETIRO:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += filaExperienciaLaboral["MOTIVO_RETIRO"].ToString().Trim();
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "<tr>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += "ULTIMO SALARIO:";
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "<td width=\"50%\" style=\"text-align:left;\">";
            html_tabla_experiencia_laboral += String.Format("$ {0:N2}", Convert.ToDecimal(filaExperienciaLaboral["ULTIMO_SALARIO"]));
            html_tabla_experiencia_laboral += "</td>";
            html_tabla_experiencia_laboral += "</tr>";

            html_tabla_experiencia_laboral += "</table>";

            contador += 1;
        }

        html_formato_entrevista = html_formato_entrevista.Replace("[TABLA_EXPERIENCIA_LABORAL]", html_tabla_experiencia_laboral);

        //ahora: si es entrevista por produccion se debe determinar que pruebas se han aplicado al candidato
        //y mostrarlas en el informe de seleccion
        //lo mismo con habilidades / competencias

        pruebaPerfil _pruebaPerfil = new pruebaPerfil(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        FabricaAssesment _fabrica = new FabricaAssesment(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaPruebas = new DataTable();
        DataTable tablaAssesmentCenter = new DataTable();
        DataTable tablaCompetencias = new DataTable();
        String TIPO_ENTREVISTA = String.Empty;
        if (ID_PERFIL <= 0)
        {
            //ES ENTREVISTA POR PRODUCCION
            tablaPruebas = _pruebaPerfil.ObtenerAplicadasAIdSolicitudConResultados(ID_SOLICITUD);
            tablaCompetencias = _fabrica.ObtenerAplicacionCompetenciasPorSolicitudIngreso(ID_SOLICITUD);
            if (tablaCompetencias.Rows.Count <= 0)
            {
                TIPO_ENTREVISTA = "B";
            }
            else
            {
                TIPO_ENTREVISTA = "A";
            }
        }
        else
        {
            //es entrevista asociada a perfil entonces cargamos lo pertinente a ese perfil
            tablaPruebas = _pruebaPerfil.ObtenerPorIdPerfilConResultadosIdSolicitud(ID_PERFIL, ID_SOLICITUD);

            if (ID_ASSESMENT_CENTER > 0)
            {
                TIPO_ENTREVISTA = "A";
                //se tiene un assesmentcenter associado
                tablaAssesmentCenter = _fabrica.ObtenerAssesmentCentePorId(ID_ASSESMENT_CENTER);
                tablaCompetencias = _fabrica.ObtenerCompetenciasAssesmentCenteActivos(ID_ASSESMENT_CENTER, ID_SOLICITUD);
            }
            else
            {
                TIPO_ENTREVISTA = "B";
            }
        }

        //AHORA SI SEGUN LOS ObTENIDOS DE LAS TABLAS SE MUESTRA EN EL INFORME.
        if (tablaPruebas.Rows.Count > 0)
        {
            String html_resultados_pruebas;
            html_resultados_pruebas = "<br />";
            html_resultados_pruebas += "<div style=\"text-align: left; margin: 0 0 0 20px; text-decoration: underline; font-weight: bold;\">";
            html_resultados_pruebas += "RESULTADO DE PRUEBAS PSICOTÉCNICAS";
            html_resultados_pruebas += "</div>";

            for (int i = 0; i < tablaPruebas.Rows.Count; i++)
            {
                DataRow filaPrueba = tablaPruebas.Rows[i];

                String NOM_PRUEBA = filaPrueba["NOM_PRUEBA"].ToString().Trim();
                String RESULTADO = filaPrueba["RESULTADOS"].ToString().Trim();

                html_resultados_pruebas += "<br />";
                html_resultados_pruebas += "<div style=\"text-align: left; margin: 0 0 0 20px; font-weight: bold; font-size:9px;\">";
                html_resultados_pruebas += NOM_PRUEBA;
                html_resultados_pruebas += "</div>";
                html_resultados_pruebas += "<div style=\"text-align: justify;\">";
                if (String.IsNullOrEmpty(RESULTADO) == false)
                {
                    html_resultados_pruebas += RESULTADO;
                }
                else
                {
                    html_resultados_pruebas += "Desconocido.";
                }
                html_resultados_pruebas += "</div>";
            }

            html_resultados_pruebas += "<br />";
            html_formato_entrevista = html_formato_entrevista.Replace("[TABLA_RESULTADO_PRUEBAS]", html_resultados_pruebas);
        }
        else
        {
            html_formato_entrevista = html_formato_entrevista.Replace("[TABLA_RESULTADO_PRUEBAS]", "<br />");
        }

        //FORMATO DE ASSESMENT CENTER
        if (TIPO_ENTREVISTA.Contains("A") == true)
        {
            String NOMBRE_ASSESMENT = "";
            if (tablaAssesmentCenter.Rows.Count > 0)
            {
                DataRow filaAssesment = tablaAssesmentCenter.Rows[0];
                NOMBRE_ASSESMENT = filaAssesment["NOMBRE_ASSESMENT"].ToString().Trim();
            }

            //En esta variable cargamos el documento plantilla por habilidades
            archivo_original = new StreamReader(Server.MapPath(@"~\plantillas_reportes\formato_evaluacion_assesmentcenter.htm"));

            String html_formato_assesment_center = archivo_original.ReadToEnd();

            archivo_original.Dispose();
            archivo_original.Close();

            String html_tabla_assesment = "<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\" align=\"center\" style=\"font-size:8px; line-height:9px;\">";
            html_tabla_assesment += "<tr>";
            html_tabla_assesment += "<td width=\"25%\" style=\"text-align:center; font-weight: bold;\">";
            html_tabla_assesment += "COMPETENCIA / HABILIDAD";
            html_tabla_assesment += "</td>";
            html_tabla_assesment += "<td width=\"35%\" style=\"text-align:center; font-weight: bold;\">";
            html_tabla_assesment += "CALIFICACIÓN";
            html_tabla_assesment += "</td>";
            html_tabla_assesment += "<td width=\"40%\" style=\"text-align:center; font-weight: bold; \">";
            html_tabla_assesment += "OBSERVACIONES";
            html_tabla_assesment += "</td>";
            html_tabla_assesment += "</tr>";

            foreach (DataRow filaCalificacionCompetencias in tablaCompetencias.Rows)
            {
                html_tabla_assesment += "<tr>";
                html_tabla_assesment += "<td width=\"25%\" style=\"text-align:left; \">";
                html_tabla_assesment += filaCalificacionCompetencias["COMPETENCIA"].ToString().Trim();
                html_tabla_assesment += "</td>";
                html_tabla_assesment += DevuelveTdsConCalificacionSegunDataRow(filaCalificacionCompetencias);
                html_tabla_assesment += "<td width=\"40%\" style=\"text-align:justify; \">";
                html_tabla_assesment += filaCalificacionCompetencias["OBSERVACIONES"].ToString().Trim();
                html_tabla_assesment += "</td>";
            }

            html_tabla_assesment += "</table>";

            html_formato_assesment_center = html_formato_assesment_center.Replace("[NOMBRE_ASSESMENT]", NOMBRE_ASSESMENT);
            html_formato_assesment_center = html_formato_assesment_center.Replace("[TABLA_DE_ASSESMENT_CENTER]", html_tabla_assesment);
            html_formato_entrevista = html_formato_entrevista.Replace("[FORMATO_EVALUACION_ASSESMENTCENTER]", html_formato_assesment_center);
        }
        else
        {
            html_formato_entrevista = html_formato_entrevista.Replace("[FORMATO_EVALUACION_ASSESMENTCENTER]", "");
        }

        // concepto general
        html_concepto = html_concepto.Replace("[CONCEPTO_GENERAL]", CONCEPTO_GENERAL);
        // concepto general
        html_formato_entrevista = html_formato_entrevista.Replace("[CONCEPTO_GENERAL]", html_concepto);

        // USUARIO QUE HIZO LA ENTREVISTA
        usuario _usuario = new usuario(Session["idEmpresa"].ToString());
        DataTable tablaUsuario = _usuario.ObtenerUsuarioPorUsuLog(USUARIO_ENTREVISTADOR); //ACA VA ES EL DE LA ENTREVISTA
        DataRow filaUsuario = tablaUsuario.Rows[0];

        if (filaUsuario["USU_TIPO"].ToString().ToUpper() == "PLANTA")
        {
            html_formato_entrevista = html_formato_entrevista.Replace("[NOMBRE_PSICOLOGO]", filaUsuario["NOMBRES"].ToString().Trim() + " " + filaUsuario["APELLIDOS"].ToString().Trim());
        }
        else
        {
            html_formato_entrevista = html_formato_entrevista.Replace("[NOMBRE_PSICOLOGO]", filaUsuario["NOMBRES_EXTERNO"].ToString().Trim() + " " + filaUsuario["APELLIDOS_EXTERNO"].ToString().Trim());
        }

        html_formato_entrevista = html_formato_entrevista.Replace("[CARGO_SICOLOGO]", "Psicólogo de Selección");

        html_formato_entrevista += html_pie;

        //creamos un configuramos el documento de pdf
        //(tamaño de la hoja,margen izq, margen der, margin arriba margen abajo)
        iTextSharp.text.Document document = new iTextSharp.text.Document(new Rectangle(595, 842), 50, 50, 80, 45);

        using (MemoryStream streamArchivo = new MemoryStream())
        {
            iTextSharp.text.pdf.PdfWriter writer = PdfWriter.GetInstance(document, streamArchivo);

            // Our custom Header and Footer is done using Event Handler
            pdfEvents PageEventHandler = new pdfEvents();
            writer.PageEvent = PageEventHandler;

            // Define the page header
            // Define the page header
            if (Session["idEmpresa"].ToString() == "1")
            {
                PageEventHandler.dirImagenHeader = Server.MapPath("~/imagenes/reportes/logo_sertempo.png");
            }
            else
            {
                PageEventHandler.dirImagenHeader = Server.MapPath("~/imagenes/reportes/logo_eficiencia.png");
            }

            PageEventHandler.fechaImpresion = DateTime.Now;
            PageEventHandler.tipoDocumento = "entrevista";

            document.Open();

            //capturamos el archivo temporal del response
            String tempFile = Path.GetTempFileName();

            //y lo llenamos con el html de la plantilla
            using (StreamWriter tempwriter = new StreamWriter(tempFile, false))
            {
                tempwriter.Write(html_formato_entrevista);
            }

            //leeemos el archivo temporal y lo colocamos en el documento de pdf
            List<IElement> htmlarraylist = HTMLWorker.ParseToList(new StreamReader(tempFile), new StyleSheet());

            foreach (IElement element in htmlarraylist)
            {
                if (element.Chunks.Count > 0)
                {
                    if (element.Chunks[0].Content == "linea para paginacion de pdf")
                    {
                        document.NewPage();
                    }
                    else
                    {
                        document.Add(element);
                    }
                }
                else
                {
                    document.Add(element);
                }
            }

            //limpiamos todo
            document.Close();

            writer.Close();

            return streamArchivo.ToArray();
        }
    }
    private void Cargar(Decimal ID_SOLICITUD)
    {
        HiddenField_ID_SOLICITUD.Value = ID_SOLICITUD.ToString();

        Decimal ID_ENTREVISTA = 0;

        radicacionHojasDeVida _rad = new radicacionHojasDeVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());

        DataTable tablaSolicitud = _rad.ObtenerRegSolicitudesingresoPorIdSolicitud(Convert.ToInt32(ID_SOLICITUD));
        DataRow filaSolicitud = tablaSolicitud.Rows[0];

        hojasVida _hoja = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
        DataTable tablaEntrevista = _hoja.ObtenerSelRegEntrevistasPorIdSolicitud(Convert.ToInt32(ID_SOLICITUD));

        if(tablaEntrevista.Rows.Count > 0)
        {
            DataRow filaEntrevista = tablaEntrevista.Rows[0];

            ID_ENTREVISTA = Convert.ToDecimal(filaEntrevista["REGISTRO"]);
        }

        CargarControlRegistros(filaSolicitud);

        CargarDatosBasicos(filaSolicitud);

        CargarUbicacion(filaSolicitud);

        CargarEducacion(filaSolicitud, ID_ENTREVISTA);
        inhabilitarFilasGrilla(GridView_EducacionFormal, 2);
        inhabilitarFilasGrilla(GridView_EducacionNoFormal, 2);

        CargarDatosLaborales(filaSolicitud, ID_ENTREVISTA);
        inhabilitarFilasGrilla(GridView_ExperienciaLaboral, 2);

        CargarFamilia(filaSolicitud, ID_ENTREVISTA);
        inhabilitarFilasGrilla(GridView_ComposicionFamiliar, 2);

        CargardatosAdicionales(filaSolicitud);

        ComprobarTodasLasPestanas(false);
        HiddenField_IndexTab.Value = "0";
        SetActivoTab(0);
    }
    protected void DropDownList_CompetenciaAssesment_SelectedIndexChanged(object sender, EventArgs e)
    {
        Int32 index = Convert.ToInt32(HiddenField_FILA_SELECCIONADA_GRILLA.Value);

        DropDownList drop = GridView_CompetenciasAssesment.Rows[index].FindControl("DropDownList_CompetenciaAssesment") as DropDownList;
        Label labelDefinicion = GridView_CompetenciasAssesment.Rows[index].FindControl("Label_DefinicionCompetencia") as Label ;
        Label labelArea = GridView_CompetenciasAssesment.Rows[index].FindControl("Label_AreaCompetencia") as Label;

        if (drop.SelectedIndex <= 0)
        {
            labelDefinicion.Text = "No seleccionado.";
            labelArea.Text = "No seleccionado.";
        }
        else
        {
            hojasVida _hoja = new hojasVida(Session["idEmpresa"].ToString(), Session["USU_LOG"].ToString());
            Decimal ID_COMPETENCIA = Convert.ToDecimal(drop.SelectedValue);

            DataTable tablaCompetencia = _hoja.ObtenerCompetenciaPorId(ID_COMPETENCIA);
            DataRow filaCompetencia = tablaCompetencia.Rows[0];

            labelDefinicion.Text = filaCompetencia["DEFINICION"].ToString();
            labelArea.Text = filaCompetencia["AREA"].ToString();
        }
    }