protected void btnEliminarPlantilla_Click(object sender, EventArgs e)
        {
            PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();

            foreach (GridDataItem item in grdPlantillas.SelectedItems)
            {
                E_RESULTADO vResultado = nPlantilla.EliminaPlantillaFormulario(int.Parse(item.GetDataKeyValue("ID_PLANTILLA_SOLICITUD").ToString()), vClUsuario, vNbPrograma);
                string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

                UtilMensajes.MensajeResultadoDB(rwmAlertas, vMensaje, vResultado.CL_TIPO_ERROR, pCallBackFunction: "onCloseWindow");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["plantillaId"] != null)
                {
                    vIdPlantilla          = int.Parse(Request.Params["plantillaId"]);
                    vClTipoPlantilla      = (string)Request.QueryString["PlantillaTipoCl"];
                    txbPrivacidad.Content = ContextoApp.IDP.MensajeCorreoSolicitud.dsMensaje;
                    PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
                    vPlantilla = nPlantilla.ObtienePlantilla(vIdPlantilla, vClTipoPlantilla);
                }

                vCorreosNombres = new List <E_CORREO_ELECTRONICO>();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                vClAccion        = (string)Request.QueryString["AccionCl"];
                vClTipoPlantilla = (string)Request.QueryString["PlantillaTipoCl"];

                int idPlantilla = 0;
                if (int.TryParse((string)Request.QueryString["PlantillaId"], out idPlantilla))
                {
                    vIdPlantilla = idPlantilla;
                }

                PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
                vPlantilla = nPlantilla.ObtienePlantilla(vIdPlantilla, vClTipoPlantilla);

                //vXmlCampos = XElement.Parse(vPlantilla.XML_PLANTILLA_FORMULARIO);

                switch (vClAccion)
                {
                case "edit":
                    txtNbPlantilla.Text = vPlantilla.NB_PLANTILLA;
                    txtDsPlantilla.Text = vPlantilla.DS_PLANTILLA;
                    vClTipoTransaccion  = "A";
                    break;

                case "copy":
                    txtNbPlantilla.EmptyMessage = vPlantilla.NB_PLANTILLA;
                    txtDsPlantilla.EmptyMessage = vPlantilla.DS_PLANTILLA;
                    vClTipoTransaccion          = "I";
                    break;
                }

                CargarLista("PERSONAL", lstInformacionGeneral);
                CargarLista("ACADEMICA", lstFormacionAcademica);
                CargarLista("FAMILIAR", lstDatosFamiliares);
                CargarLista("LABORAL", lstExperienciaLaboral);
                CargarLista("COMPETENCIAS", lstInteresesCompetencias);
                CargarLista("ADICIONAL", lstInformacionAdicional);
                CargarLista(null, lstCamposDisponibles);
            }

            DespacharEventos(Request.Params.Get("__EVENTTARGET"), Request.Params.Get("__EVENTARGUMENT"));

            vClUsuario  = ContextoUsuario.oUsuario.CL_USUARIO;
            vNbPrograma = ContextoUsuario.nbPrograma;
        }
        protected void CargarDatos(int?pIdRol)
        {
            RolNegocio nRol = new RolNegocio();

            E_ROL vRol = nRol.ObtieneFuncionesRol(pIdRol);

            txtClRol.Text     = vRol.CL_ROL;
            txtNbRol.Text     = vRol.NB_ROL;
            chkActivo.Checked = vRol.FG_ACTIVO;
            vLstFunciones     = vRol.LST_FUNCIONES;

            PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
            List <SPE_OBTIENE_C_PLANTILLA_FORMULARIO_Result> vLstPlantillas = nPlantilla.ObtienePlantillas();

            rcbPlantilla.DataSource     = vLstPlantillas.Where(w => w.CL_FORMULARIO == "INVENTARIO").ToList();
            rcbPlantilla.DataTextField  = "NB_PLANTILLA_SOLICITUD";
            rcbPlantilla.DataValueField = "ID_PLANTILLA_SOLICITUD";
            rcbPlantilla.DataBind();

            if (vRol.ID_PLANTILLA != null)
            {
                rcbPlantilla.ClearSelection();
                rcbPlantilla.SelectedValue = vRol.ID_PLANTILLA.ToString();
            }


            if (vRol.XML_GRUPOS != null)
            {
                vLstGruposPlaza = (XElement.Parse(vRol.XML_GRUPOS).Elements("GRUPOS")).Select(s => new E_GRUPOS
                {
                    ID_GRUPO = int.Parse(s.Attribute("ID_GRUPO").Value),
                    CL_GRUPO = s.Attribute("CL_GRUPO").Value,
                    NB_GRUPO = s.Attribute("NB_GRUPO").Value
                }).ToList();
            }
            else
            {
                vLstGruposPlaza.Add(new E_GRUPOS()
                {
                    ID_GRUPO = 1, CL_GRUPO = "TODOS", NB_GRUPO = "Todos"
                });
            }
        }
Exemple #5
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            XElement       vXmlPlantilla    = new XElement("PLANTILLA");
            XElement       vXmlContenedores = new XElement("CONTENEDORES");
            List <E_CAMPO> vLstCampos       = new List <E_CAMPO>();

            XElement vXmlPersonal = new XElement("CONTENEDOR", new XAttribute("ID_CONTENEDOR", "PERSONAL"));

            vXmlPersonal.Add(lstInformacionGeneral.Items.Select(s => XElement.Parse(vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value).XML_CAMPO)));
            vXmlContenedores.Add(vXmlPersonal);
            vLstCampos.AddRange(lstInformacionGeneral.Items.Select(s => vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value)).Select(s => { s.CL_CONTENEDOR = "PERSONAL"; return(s); }));

            XElement vXmlFamiliar = new XElement("CONTENEDOR", new XAttribute("ID_CONTENEDOR", "FAMILIAR"));

            vXmlFamiliar.Add(lstDatosFamiliares.Items.Select(s => XElement.Parse(vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value).XML_CAMPO)));
            vXmlContenedores.Add(vXmlFamiliar);
            vLstCampos.AddRange(lstDatosFamiliares.Items.Select(s => vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value)).Select(s => { s.CL_CONTENEDOR = "FAMILIAR"; return(s); }));

            XElement vXmlAcademica = new XElement("CONTENEDOR", new XAttribute("ID_CONTENEDOR", "ACADEMICA"));

            vXmlAcademica.Add(lstFormacionAcademica.Items.Select(s => XElement.Parse(vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value).XML_CAMPO)));
            vXmlContenedores.Add(vXmlAcademica);
            vLstCampos.AddRange(lstFormacionAcademica.Items.Select(s => vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value)).Select(s => { s.CL_CONTENEDOR = "ACADEMICA"; return(s); }));

            XElement vXmlLaboral = new XElement("CONTENEDOR", new XAttribute("ID_CONTENEDOR", "LABORAL"));

            vXmlLaboral.Add(lstExperienciaLaboral.Items.Select(s => XElement.Parse(vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value).XML_CAMPO)));
            vXmlContenedores.Add(vXmlLaboral);
            vLstCampos.AddRange(lstExperienciaLaboral.Items.Select(s => vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value)).Select(s => { s.CL_CONTENEDOR = "LABORAL"; return(s); }));

            XElement vXmlCompetencias = new XElement("CONTENEDOR", new XAttribute("ID_CONTENEDOR", "COMPETENCIAS"));

            vXmlCompetencias.Add(lstInteresesCompetencias.Items.Select(s => XElement.Parse(vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value).XML_CAMPO)));
            vXmlContenedores.Add(vXmlCompetencias);
            vLstCampos.AddRange(lstInteresesCompetencias.Items.Select(s => vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value)).Select(s => { s.CL_CONTENEDOR = "COMPETENCIAS"; return(s); }));

            XElement vXmlAdicional = new XElement("CONTENEDOR", new XAttribute("ID_CONTENEDOR", "ADICIONAL"));

            vXmlAdicional.Add(lstInformacionAdicional.Items.Select(s => XElement.Parse(vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value).XML_CAMPO)));
            vXmlContenedores.Add(vXmlAdicional);
            vLstCampos.AddRange(lstInformacionAdicional.Items.Select(s => vPlantilla.LST_CAMPOS.FirstOrDefault(f => f.ID_CAMPO.ToString() == s.Value)).Select(s => { s.CL_CONTENEDOR = "ADICIONAL"; return(s); }));

            vXmlPlantilla.Add(vXmlContenedores);

            vPlantilla.ID_PLANTILLA             = vIdPlantilla ?? 0;
            vPlantilla.CL_FORMULARIO            = vClTipoPlantilla;
            vPlantilla.NB_PLANTILLA             = txtNbPlantilla.Text;
            vPlantilla.DS_PLANTILLA             = txtDsPlantilla.Text;
            vPlantilla.CL_EXPOSICION            = cmbTipoExposición.SelectedValue;
            vPlantilla.XML_PLANTILLA_FORMULARIO = vXmlPlantilla.ToString();
            vPlantilla.LST_CAMPOS = vLstCampos;

            if (listacambios != null)
            {
                var vXmlCampos = listacambios.Select(x =>
                                                     new XElement("CAMPO",
                                                                  new XAttribute("ID_CAMPO_FORMULARIO", x.ID_CAMPO),
                                                                  new XAttribute("NB_CAMPO_FORMULARIO", x.NB_CAMPO),
                                                                  new XAttribute("DS_CAMPO_FORMULARIO", x.DS_CAMPO)
                                                                  ));
                vLstCambiosModificados =
                    new XElement("CAMPOS", vXmlCampos
                                 );
            }
            else
            {
                vLstCambiosModificados = new XElement("CAMPOS");
            }

            vPlantilla.XML_CAMPOS = vLstCambiosModificados.ToString();
            PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
            E_RESULTADO vResultado = nPlantilla.InsertaActualizaPlantillaFormulario(vClTipoTransaccion, vPlantilla, vClUsuario, vNbPrograma);
            string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

            UtilMensajes.MensajeResultadoDB(rwmAlertas, vMensaje, vResultado.CL_TIPO_ERROR);
        }
Exemple #6
0
        private void mostrarDiv()
        {
            switch (vClProceso)
            {
            case "EVALUACION":

                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = true;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = false;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtEvento.Text    = pe.NombreProceso;
                    txtEvaluador.Text = pe.UsuarioProceso;
                }
                else
                {
                    UtilMensajes.MensajeResultadoDB(RadWindowManager1, pe.MensajeError, E_TIPO_RESPUESTA_DB.WARNING);
                }
                txtEvento.ReadOnly    = true;
                txtEvaluador.ReadOnly = true;

                break;

            case "CUESTIONARIOS":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = true;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = false;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtEvaluadorCuestionario.Text = pe.UsuarioProceso;
                    txtPeriodoCapacitacion.Text   = pe.NombreProceso;
                }
                txtEvaluadorCuestionario.ReadOnly = true;
                txtPeriodoCapacitacion.ReadOnly   = true;

                break;

            case "CLIMALABORAL":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = true;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = false;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    //txtEvaluadorClima.Text = pe.UsuarioProceso;
                    txtPeriodoClima.Text = pe.NombreProceso;
                }
                txtPeriodoClima.ReadOnly = true;

                break;

            case "ACTUALIZACIONCARTERA":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = true;
                ContentEntrevista.Visible                = false;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                break;

            case "ENTREVISTA_SELECCION":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = true;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtEntrevistador.Text = pe.UsuarioProceso;
                }
                txtEntrevistador.ReadOnly = true;

                break;

            case "NOTIFICACIONRRHH":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = false;
                ContentRequisiciones.Visible             = true;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtNotificacion.Text = pe.FlRequisicion;
                    txtPuesto.Text       = pe.NombreProceso;
                }
                txtNotificacion.ReadOnly = true;
                txtPuesto.ReadOnly       = true;

                break;

            case "AUTORIZAREQUISICION":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = false;
                ContentRequisiciones.Visible             = false;
                ContentAutorizaRequisicion.Visible       = true;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = false;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    rtbAutRequisicion.Text = pe.FlRequisicion;
                    rtbPuesto.Text         = pe.NombreProceso;
                }
                rtbAutRequisicion.ReadOnly = true;
                rtbPuesto.ReadOnly         = true;

                break;

            case "AUTORIZAREQPUESTO":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                     = false;
                ContentPasswordRecovery.Visible          = false;
                ContentCodigoConfirmacion.Visible        = false;
                ContentEvaluacionResultados.Visible      = false;
                ContentCuestionarios.Visible             = false;
                ContentClimaLaboral.Visible              = false;
                ContentCartera.Visible                   = false;
                ContentEntrevista.Visible                = false;
                ContentRequisiciones.Visible             = false;
                ContentAutorizaRequisicion.Visible       = false;
                ContentEvaluacionDesempeno.Visible       = false;
                ContentAutorizaPuestoRequisicion.Visible = true;
                ContentCuestionario.Visible              = false;
                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtAPRequisicion.Text = pe.FlRequisicion;
                    txtAPPuesto.Text      = pe.NombreProceso;
                }
                txtAPRequisicion.ReadOnly = true;
                txtAPPuesto.ReadOnly      = true;

                break;

            case "DESEMPENO":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                = false;
                ContentPasswordRecovery.Visible     = false;
                ContentCodigoConfirmacion.Visible   = false;
                ContentEvaluacionResultados.Visible = false;
                ContentCuestionarios.Visible        = false;
                ContentClimaLaboral.Visible         = false;
                ContentCartera.Visible              = false;
                ContentEntrevista.Visible           = false;
                ContentRequisiciones.Visible        = false;
                ContentAutorizaRequisicion.Visible  = false;
                ContentEvaluacionDesempeno.Visible  = true;
                ContentCuestionario.Visible         = false;

                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtEvaluadorDesempeno.Text = pe.UsuarioProceso;
                    txtPeriodoDesempeno.Text   = pe.NombreProceso;
                }
                txtEvaluadorDesempeno.ReadOnly = true;
                txtPeriodoDesempeno.ReadOnly   = true;

                break;

            case "CUESTIONARIO":
                ContentAutorizaDocumentos.Visible = false;
                ContentLogin.Visible                = false;
                ContentPasswordRecovery.Visible     = false;
                ContentCodigoConfirmacion.Visible   = false;
                ContentEvaluacionResultados.Visible = false;
                ContentCuestionarios.Visible        = false;
                ContentClimaLaboral.Visible         = false;
                ContentCartera.Visible              = false;
                ContentEntrevista.Visible           = false;
                ContentRequisiciones.Visible        = false;
                ContentAutorizaRequisicion.Visible  = false;
                ContentEvaluacionDesempeno.Visible  = false;
                ContentCuestionario.Visible         = true;

                pe.FolioProceso = vFolioProceso.Value;

                if (pe.ObtenerInformacionProceso(vClProceso))
                {
                    txtEvaluadorCuestionarioInd.Text = pe.UsuarioProceso;
                    txtPeriodoCuestionarioInd.Text   = pe.NombreProceso;
                }

                txtEvaluadorCuestionarioInd.ReadOnly = true;
                txtPeriodoCuestionarioInd.ReadOnly   = true;

                break;

            case "ENVIOSOLICITUDPLANTILLA":
                if (vFolioProceso != null)
                {
                    PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
                    var vLstPlanilla = nPlantilla.ObtienePlantillas(pFlPlantillaSolicitud: vFolioProceso).FirstOrDefault();
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "OpenWindowPlantilla(" + vLstPlanilla.ID_PLANTILLA_SOLICITUD.ToString() + ")", true);
                }

                break;

            default:
                break;
            }
        }
Exemple #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.QueryString["ClProceso"] != null)
                {
                    pe = new ProcesoExterno();
                    //En esta parte tiene que procesar los datos para el proceso externo. Vamos a obtener el proceso, el Guid, en base al proceso es el div que se mostrara.
                    //Se hara una funcion para mostrar los divs

                    vClProceso    = Request.QueryString["ClProceso"];
                    vFolioProceso = Guid.Parse(Request.QueryString["FlProceso"]);
                }


                if ((Request.QueryString["AUTORIZA"]) != null)
                {
                    ptipo = (string)(Request.QueryString["AUTORIZA"]);
                    pFolioAutorizacion = Guid.Parse((Request.QueryString["TOKEN"]));
                    DocumentoAutorizarNegocio nDocumento = new DocumentoAutorizarNegocio();
                    var DocumentoAutorizar = nDocumento.ObtieneEmpleadoDocumentoAutorizacion(pFlAutorizacion: pFolioAutorizacion).Where(w => w.ID_PERIODO != null).FirstOrDefault();

                    if (DocumentoAutorizar != null)
                    {
                        if (DocumentoAutorizar.ID_PROGRAMA != null)
                        {
                            txtProgramaCapacitacion.Text = DocumentoAutorizar.NB_PROGRAMA.ToString();
                            vIdPrograma = DocumentoAutorizar.ID_PROGRAMA;
                            txtProgramaCapacitacion.ReadOnly = true;
                            txtAutorizador.ReadOnly          = true;
                        }
                        else
                        {
                            txtProgramaCapacitacion.Text = DocumentoAutorizar.NB_PERIODO;
                            vIdPeriodo = DocumentoAutorizar.ID_PERIODO;
                            txtProgramaCapacitacion.ReadOnly = true;
                            txtAutorizador.ReadOnly          = true;
                        }

                        //txtAutorizador.Text = DocumentoAutorizar.NB_EMPLEADO_ELABORA.ToString();
                        txtAutorizador.Text = DocumentoAutorizar.NB_EMPLEADO.ToString();
                        pClaveToken         = DocumentoAutorizar.CL_TOKEN.ToString();
                    }
                    ContentAutorizaDocumentos.Visible = true;
                    ContentLogin.Visible                     = false;
                    ContentPasswordRecovery.Visible          = false;
                    ContentCodigoConfirmacion.Visible        = false;
                    ContentEvaluacionResultados.Visible      = false;
                    ContentCuestionarios.Visible             = false;
                    ContentClimaLaboral.Visible              = false;
                    ContentCartera.Visible                   = false;
                    ContentEntrevista.Visible                = false;
                    ContentRequisiciones.Visible             = false;
                    ContentAutorizaRequisicion.Visible       = false;
                    ContentEvaluacionDesempeno.Visible       = false;
                    ContentAutorizaPuestoRequisicion.Visible = false;
                    ContentCuestionario.Visible              = false;
                }
                else
                {
                    ContentPasswordRecovery.Visible     = false;
                    ContentCodigoConfirmacion.Visible   = false;
                    ContentAutorizaDocumentos.Visible   = false;
                    ContentEvaluacionResultados.Visible = false;
                    ContentCuestionarios.Visible        = false;
                    ContentClimaLaboral.Visible         = false;
                    ContentCartera.Visible                   = false;
                    ContentEntrevista.Visible                = false;
                    ContentRequisiciones.Visible             = false;
                    ContentAutorizaRequisicion.Visible       = false;
                    ContentEvaluacionDesempeno.Visible       = false;
                    ContentAutorizaPuestoRequisicion.Visible = false;
                    ContentCuestionario.Visible              = false;
                }

                mostrarDiv();
                FgLicenciaActiva();
            }

            PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();
            List <SPE_OBTIENE_C_PLANTILLAS_EXTERNAS_Result> vLstPlantillas = nPlantilla.ObtenerPlantillasExternas("EXTERIOR");

            foreach (var item in vLstPlantillas)
            {
                HtmlGenericControl viSolicitud = new HtmlGenericControl("i");
                viSolicitud.Attributes.Add("class", "fa fa-file-text");
                HtmlGenericControl vControlSolicitud = new HtmlGenericControl("a");
                vControlSolicitud.Attributes.Add("href", "#");
                vControlSolicitud.Attributes.Add("onclick", "return OpenWindowPlantilla(" + item.ID_PLANTILLA_SOLICITUD.ToString() + ");");
                vControlSolicitud.Attributes.Add("style", "margin: 20px;");
                vControlSolicitud.InnerText = item.NB_PLANTILLA_SOLICITUD;
                vControlSolicitud.Style.Add("font-size", "14px");
                vControlSolicitud.Style.Add(" font-family", "sans-serif");
                viSolicitud.Controls.Add(vControlSolicitud);
                dvSolicitudes.Controls.Add(viSolicitud);
            }
            if (vLstPlantillas.Count > 1)
            {
                int vTamanoDiv = vLstPlantillas.Count * 35;
                dvSolicitudes.Style.Add("height", vTamanoDiv.ToString() + "px");
            }

            lblEmpresa.InnerText           = ContextoApp.InfoEmpresa.NbEmpresa;
            rbiLogoOrganizacion1.DataValue = ContextoApp.InfoEmpresa.FiLogotipo.FiArchivo;
            rbiLogoOrganizacion2.DataValue = ContextoApp.InfoEmpresa.FiLogotipo.FiArchivo;
            rbiLogoOrganizacion3.DataValue = ContextoApp.InfoEmpresa.FiLogotipo.FiArchivo;

            //Licencia
            if (ContextoApp.InfoEmpresa.MsgSistema != "1")
            {
                btnLogin.Enabled                          = false;
                btnRecuperarPassword.Enabled              = false;
                btnAbrirCuestionario.Enabled              = false;
                btnAbrirCuestionarioClima.Enabled         = false;
                btnAbrirCuestionarioDesempeno.Enabled     = false;
                btnAbrirCuestionarioIndependiente.Enabled = false;
                btnAbrirEntrevista.Enabled                = false;
                btnAbrirEvaluacion.Enabled                = false;
                btnAbrirRequisicion.Enabled               = false;
                btnAutorizarReqPuesto.Enabled             = false;
                btnCartera.Enabled                        = false;
                btnConfirmarCodigo.Enabled                = false;
                btnEnviarPorCuenta.Enabled                = false;
                btnIntroducirCodigo.Enabled               = false;
                btnSiguiente.Enabled                      = false;
                UtilMensajes.MensajeResultadoDB(RadWindowManager1, ContextoApp.InfoEmpresa.MsgSistema, E_TIPO_RESPUESTA_DB.WARNING);
            }
            // Fin de licencia
        }
        protected void grdPlantillas_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            PlantillaFormularioNegocio nPlantilla = new PlantillaFormularioNegocio();

            grdPlantillas.DataSource = nPlantilla.ObtienePlantillasPDE();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            PlantillaFormularioNegocio nPlantillas    = new PlantillaFormularioNegocio();
            CatalogoValorNegocio       nValorGenerico = new CatalogoValorNegocio();
            SolicitudNegocio           nSolicitud     = new SolicitudNegocio();
            CandidatoNegocio           nCandidato     = new CandidatoNegocio();

            if (!IsPostBack)
            {
                vCONTADOR_FAMILIAR = 0;
                //vID_CANDIDATO = -1;
                //vID_CANDIDATO = -1;
                vID_FAMILIAR = -1;

                vFamiliares = new List <E_DATOS_FAMILIARES>();
                //SecuenciaNegocio nSecuencia = new SecuenciaNegocio();
                //var vObjetoSecuencia = nSecuencia.Obtener_C_SECUENCIA().FirstOrDefault();
                //vClSecuencia = vObjetoSecuencia.CL_SECUENCIA;

                //var vUltiomFolio= nSecuencia.ObtieneFolioSecuencia(vClSecuencia).FirstOrDefault();
                //txtFolio.Text = vUltiomFolio.NO_SECUENCIA.ToString();



                /////////////////////////////////////INFORMACION PERSONAL CONTROLADORES/////////////////////////////////////////////


                var vPlantillas = nPlantillas.Obtener_C_PLANTILLA_FORMULARIO();
                cmbPlantillas.DataSource     = vPlantillas;//LLENAMOS DE DATOS EL GRID
                cmbPlantillas.DataTextField  = "CL_FORMULARIO";
                cmbPlantillas.DataTextField  = "NB_PLANTILLA_SOLICITUD";
                cmbPlantillas.DataValueField = "ID_PLANTILLA_SOLICITUD";
                cmbPlantillas.DataBind();

                //EN DURO ID CATALOGO LISTA
                var vNacionalidades = nValorGenerico.Obtener_C_CATALOGO_VALOR(ID_CATALOGO_LISTA: ContextoApp.IdCatalogoNacionalidades);
                cmbNacionalidad.DataSource     = vNacionalidades;//LLENAMOS DE DATOS EL GRID
                cmbNacionalidad.DataTextField  = "CL_CATALOGO_VALOR";
                cmbNacionalidad.DataTextField  = "NB_CATALOGO_VALOR";
                cmbNacionalidad.DataValueField = "CL_CATALOGO_VALOR";
                cmbNacionalidad.DataBind();


                var vGeneros = nValorGenerico.Obtener_C_CATALOGO_VALOR(ID_CATALOGO_LISTA: ContextoApp.IdCatalogoGeneros);
                cmbGeneros.DataSource     = vGeneros;//LLENAMOS DE DATOS EL GRID
                cmbGeneros.DataTextField  = "CL_CATALOGO_VALOR";
                cmbGeneros.DataTextField  = "NB_CATALOGO_VALOR";
                cmbGeneros.DataValueField = "CL_CATALOGO_VALOR";
                cmbGeneros.DataBind();

                var vEstadosCivil = nValorGenerico.Obtener_C_CATALOGO_VALOR(ID_CATALOGO_LISTA: ContextoApp.IdCatalogoEstadosCivil);
                cmbEstadoCivil.DataSource     = vEstadosCivil;//LLENAMOS DE DATOS EL GRID
                cmbEstadoCivil.DataTextField  = "CL_CATALOGO_VALOR";
                cmbEstadoCivil.DataTextField  = "NB_CATALOGO_VALOR";
                cmbEstadoCivil.DataValueField = "CL_CATALOGO_VALOR";
                cmbEstadoCivil.DataBind();



                ////////////////////////////////////////DATOS FAMILIARES CONTROLADORES/////////////////////////////////////////////////////////////

                CatalogoValorNegocio nValor = new CatalogoValorNegocio();
                var vParentescos            = nValor.Obtener_C_CATALOGO_VALOR(ID_CATALOGO_LISTA: ContextoApp.IdCatalogoParentescos);
                cmbParentesco.DataSource = vParentescos;
                //cmbParentesco.DataTextField = "CL_CATALOGO_VALOR";
                cmbParentesco.DataTextField  = "NB_CATALOGO_VALOR";
                cmbParentesco.DataValueField = "CL_CATALOGO_VALOR";
                cmbParentesco.DataBind();


                /////////////////////////////////EDICION DE UNA SOLICITUD/////////////////////////////////////////////
                if (Request.Params["ID"] != null)
                {
                    vID_SOLICITUD = int.Parse(Request.Params["ID"]);
                    var vSolicitud       = nSolicitud.ObtieneSolicitudes(ID_SOLICITUD: vID_SOLICITUD).FirstOrDefault();
                    var vCandidatoEditar = nCandidato.Obtener_C_CANDIDATO(ID_CANDIDATO: vSolicitud.ID_CANDIDATO).FirstOrDefault();

                    vID_CANDIDATO            = vCandidatoEditar.ID_CANDIDATO;
                    txtNombre.Text           = vCandidatoEditar.NB_CANDIDATO;
                    txtApellidoP.Text        = vCandidatoEditar.NB_APELLIDO_PATERNO;
                    txtApellidoM.Text        = vCandidatoEditar.NB_APELLIDO_MATERNO;
                    cmbGeneros.SelectedValue = vCandidatoEditar.CL_GENERO;
                    txtRFC.Text  = vCandidatoEditar.CL_RFC;
                    txtCURP.Text = vCandidatoEditar.CL_CURP;
                    cmbEstadoCivil.SelectedValue = vCandidatoEditar.CL_ESTADO_CIVIL;
                    txtNombreConyugue.Text       = vCandidatoEditar.NB_CONYUGUE;
                    txtNSS.Text = vCandidatoEditar.CL_NSS;
                    //CL_TIPO_SANGUINEO = txt,
                    txtPais.Text      = vCandidatoEditar.NB_PAIS;
                    txtEstado.Text    = vCandidatoEditar.NB_ESTADO;
                    txtMunicipio.Text = vCandidatoEditar.NB_MUNICIPIO;

                    ColoniaNegocio nColonia             = new ColoniaNegocio();
                    var            vColoniaSeleccionada = nColonia.Obtener_C_COLONIA(NB_COLONIA: vCandidatoEditar.NB_COLONIA, CL_CODIGO_POSTAL: vCandidatoEditar.CL_CODIGO_POSTAL);
                    cmbColonias.DataSource     = vColoniaSeleccionada;
                    cmbColonias.DataTextField  = "CL_COLONIA";
                    cmbColonias.DataTextField  = "NB_COLONIA";
                    cmbColonias.DataValueField = "ID_COLONIA";
                    cmbColonias.DataBind();
                    cmbColonias.SelectedValue = vColoniaSeleccionada.FirstOrDefault().ID_COLONIA + "";


                    txtCalle.Text             = vCandidatoEditar.NB_CALLE;
                    txtNoInterior.Text        = vCandidatoEditar.NO_INTERIOR;
                    txtNoExterior.Text        = vCandidatoEditar.NO_EXTERIOR;
                    txtCP.Text                = vCandidatoEditar.CL_CODIGO_POSTAL;
                    txtCorreoElectronico.Text = vCandidatoEditar.CL_CORREO_ELECTRONICO;
                    //FE_NACIMIENTO = Fe_Nacimient.SelectedDate,
                    txtLugarNac.Text = vCandidatoEditar.DS_LUGAR_NACIMIENTO;
                    //MN_SUELDO = txtmn,
                    cmbNacionalidad.SelectedValue = vCandidatoEditar.CL_NACIONALIDAD;
                    txtOtra.Text              = vCandidatoEditar.DS_NACIONALIDAD;
                    txtLicenciaTipo.Text      = vCandidatoEditar.NB_LICENCIA;
                    txtVehiculos.Text         = vCandidatoEditar.DS_VEHICULO;
                    txtCartillaMilitar.Text   = vCandidatoEditar.CL_CARTILLA_MILITAR;
                    txtCedulaProfesional.Text = vCandidatoEditar.CL_CEDULA_PROFESIONAL;
                    //Telefonos.ToString() = vCandidato.XML_TELEFONOS;

                    List <E_TELEFONOS> vTelefono = XElement.Parse(vCandidatoEditar.XML_TELEFONOS).Elements("TELEFONO").Select(el => new E_TELEFONOS
                    {
                        CELULAR = el.Attribute("CELULAR").Value,
                        CASA    = el.Attribute("CASA").Value,
                        OTROS   = el.Attribute("OTROS").Value
                    }).ToList();


                    txtCelula.Text         = vTelefono.ElementAt(0).CELULAR;
                    txtTel.Text            = vTelefono.ElementAt(0).CASA;
                    txtOtrosCelulares.Text = vTelefono.ElementAt(0).OTROS;



                    ParienteNegocio nPariente  = new ParienteNegocio();
                    var             vparientes = nPariente.Obtener_C_PARIENTE(ID_CANDIDATO: vID_CANDIDATO);

                    grdDatosFamiliares.DataSource = vparientes;
                    grdDatosFamiliares.Rebind();
                }
            }

            else
            {
            }
        }