Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["pIdPuesto"] != null)
                {
                    vIdPuesto = int.Parse(Request.Params["pIdPuesto"].ToString());
                    DescriptivoNegocio nDescriptivo = new DescriptivoNegocio();
                    E_DESCRIPTIVO      vDescriptivo = nDescriptivo.ObtieneDescriptivo(vIdPuesto);
                    txtClPuesto.InnerText = vDescriptivo.CL_PUESTO + " - " + vDescriptivo.NB_PUESTO;

                    CargarDatosOrganigrama(null, true, vIdPuesto);
                }
            }
        }
        private void CargarDatos()
        {
            CandidatoNegocio   nCandidato   = new CandidatoNegocio();
            DescriptivoNegocio nDescriptivo = new DescriptivoNegocio();

            var vCandidato = nCandidato.ObtieneCandidato(pIdCandidato: vIdCandidato).FirstOrDefault();

            if (vCandidato != null)
            {
                txtClSolicitud.InnerText = vCandidato.CL_SOLICITUD;
                txtNbCandidato.InnerText = vCandidato.NB_CANDIDATO_COMPLETO;
            }

            var vPuesto = nDescriptivo.ObtieneDescriptivo(vIdPuesto);

            if (vPuesto != null)
            {
                txtNbPuesto.InnerText = vPuesto.CL_PUESTO + " - " + vPuesto.NB_PUESTO;
            }

            CargarCalificaciones();
        }
Esempio n. 3
0
        private void CargarDatos()
        {
            DescriptivoNegocio nPuesto = new DescriptivoNegocio();
            E_DESCRIPTIVO      vPuesto = nPuesto.ObtieneDescriptivo(vIdPuesto);

            if (vPuesto != null)
            {
                txtPuesto.InnerText = vPuesto.CL_PUESTO + " - " + vPuesto.NB_PUESTO;

                List <SPE_OBTIENE_PUESTO_FACTOR_Result> vListaFactores = new List <SPE_OBTIENE_PUESTO_FACTOR_Result>();

                vListaFactores = nPuesto.ObtieneFactoresPuestos(vIdPuesto);

                if (vListaFactores.Count > 0)
                {
                    var vPrimerFactor = vListaFactores.Where(t => t.NO_FACTOR == 1).FirstOrDefault();

                    if (vPrimerFactor != null)
                    {
                        chkHabilitarF1.Checked = vPrimerFactor.FG_ACTIVO;
                        txtNombreF1.Text       = vPrimerFactor.NB_FACTOR;
                        txtPonderacionF1.Value = (double)vPrimerFactor.PR_FACTOR;
                        //rbInglesF1.Checked = vPrimerFactor.FG_ASOCIADO_INGLES;
                    }

                    var vSegundoFactor = vListaFactores.Where(t => t.NO_FACTOR == 2).FirstOrDefault();

                    if (vSegundoFactor != null)
                    {
                        chkHabilitarF2.Checked = vSegundoFactor.FG_ACTIVO;
                        txtNombreF2.Text       = vSegundoFactor.NB_FACTOR;
                        txtPonderacionF2.Value = (double)vSegundoFactor.PR_FACTOR;
                        rbInglesF2.Checked     = vSegundoFactor.FG_ASOCIADO_INGLES;
                    }

                    var vTercerFactor = vListaFactores.Where(t => t.NO_FACTOR == 3).FirstOrDefault();

                    if (vTercerFactor != null)
                    {
                        chkHabilitarF3.Checked = vTercerFactor.FG_ACTIVO;
                        txtNombreF3.Text       = vTercerFactor.NB_FACTOR;
                        txtPonderacionF3.Value = (double)vTercerFactor.PR_FACTOR;
                        rbInglesF3.Checked     = vTercerFactor.FG_ASOCIADO_INGLES;
                    }

                    var vCuartoFactor = vListaFactores.Where(t => t.NO_FACTOR == 4).FirstOrDefault();

                    if (vCuartoFactor != null)
                    {
                        chkHabilitarF4.Checked = vCuartoFactor.FG_ACTIVO;
                        txtNombreF4.Text       = vCuartoFactor.NB_FACTOR;
                        txtPonderacionF4.Value = (double)vCuartoFactor.PR_FACTOR;
                        rbInglesF4.Checked     = vCuartoFactor.FG_ASOCIADO_INGLES;
                    }

                    var vQuintoFactor = vListaFactores.Where(t => t.NO_FACTOR == 5).FirstOrDefault();

                    if (vQuintoFactor != null)
                    {
                        chkHabilitarF5.Checked = vQuintoFactor.FG_ACTIVO;
                        txtNombreF5.Text       = vQuintoFactor.NB_FACTOR;
                        txtPonderacionF5.Value = (double)vQuintoFactor.PR_FACTOR;
                        rbInglesF5.Checked     = vQuintoFactor.FG_ASOCIADO_INGLES;
                    }

                    var vSextoFactor = vListaFactores.Where(t => t.NO_FACTOR == 6).FirstOrDefault();

                    if (vSextoFactor != null)
                    {
                        chkHabilitarF6.Checked = vSextoFactor.FG_ACTIVO;
                        txtNombreF6.Text       = vSextoFactor.NB_FACTOR;
                        txtPonderacionF6.Value = (double)vSextoFactor.PR_FACTOR;
                        rbInglesF6.Checked     = vSextoFactor.FG_ASOCIADO_INGLES;
                    }

                    rbSinIngles.Checked = vListaFactores.Count(t => t.FG_ASOCIADO_INGLES == true) == 0;

                    decimal vPrtoTotalPonderacion = vListaFactores.Sum(t => t.PR_FACTOR);
                    if (vPrtoTotalPonderacion < 100)
                    {
                        txtPonderacionF1.Value = 16.67;
                        txtPonderacionF2.Value = 16.67;
                        txtPonderacionF3.Value = 16.67;
                        txtPonderacionF4.Value = 16.67;
                        txtPonderacionF5.Value = 16.66;
                        txtPonderacionF6.Value = 16.66;
                    }
                }
                else
                {
                    E_RESULTADO vResultado = nPuesto.InsertaPuestoFactor(vIdPuesto, vClUsuario, vNbPrograma);
                    string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

                    if (vResultado.CL_TIPO_ERROR != E_TIPO_RESPUESTA_DB.SUCCESSFUL)
                    {
                        UtilMensajes.MensajeResultadoDB(rwmAlertas, vMensaje, vResultado.CL_TIPO_ERROR, pCallBackFunction: "");
                    }
                    else
                    {
                        CargarDatos();
                    }
                }
            }
        }