예제 #1
0
        protected void grdCompetencia_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            CompetenciaNegocio nCompetencia = new CompetenciaNegocio();
            var Competencia = nCompetencia.ObtieneCompetencias(pXmlSeleccion: vXmlTipoSeleccion, pClTipoCompetencia: vClTipoCompetencia);

            grdCompetencia.DataSource = Competencia;
        }
        protected void grdFactores_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            CompetenciaNegocio nFactor = new CompetenciaNegocio();
            var Factores = nFactor.ObtenerFactoresValuacion();

            grdFactores.DataSource = Factores;
        }
        protected void grdRepCompLaborales_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            CompetenciaNegocio competencias = new CompetenciaNegocio();
            List <SPE_OBTIENE_COMPETENCIAS_LABORALES_Result> listaCompetencias = new List <SPE_OBTIENE_COMPETENCIAS_LABORALES_Result>();

            listaCompetencias           = competencias.ObtenerCompetenciasLaborales();
            grdCompLaborales.DataSource = listaCompetencias;
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            vCompetencias = new List <SPE_OBTIENE_C_COMPETENCIA_Result>();
            vClUsuario    = ContextoUsuario.oUsuario.CL_USUARIO;
            vNbPrograma   = ContextoUsuario.nbPrograma;
            if (!IsPostBack)
            {
            }

            CompetenciaNegocio negocio = new CompetenciaNegocio();

            vCompetencias = negocio.ObtieneCompetencias();
        }
예제 #5
0
        protected void btnEliminar_Click(object sender, EventArgs e)
        {
            foreach (GridDataItem item in grvCompetencias.SelectedItems)
            {
                if (item != null)
                {
                    SPE_OBTIENE_C_COMPETENCIA_Result lista = new SPE_OBTIENE_C_COMPETENCIA_Result();

                    lista = getCompetencia(int.Parse(item.GetDataKeyValue("ID_COMPETENCIA").ToString()));

                    CompetenciaNegocio negocio = new CompetenciaNegocio();

                    E_RESULTADO vResultado = negocio.EliminaCompetenica(lista.ID_COMPETENCIA, vClUsuario, vNbPrograma);
                    string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

                    UtilMensajes.MensajeResultadoDB(rnMensaje, vMensaje, vResultado.CL_TIPO_ERROR, 400, 150, "onCloseWindow");
                }
            }
        }
예제 #6
0
        protected SPE_OBTIENE_C_COMPETENCIA_Result getCompetencia(int idCompetencia)
        {
            CompetenciaNegocio negocio = new CompetenciaNegocio();

            List <SPE_OBTIENE_C_COMPETENCIA_Result> lista = negocio.ObtieneCompetencias();

            var q = from o in lista
                    where o.ID_COMPETENCIA == idCompetencia
                    select new SPE_OBTIENE_C_COMPETENCIA_Result {
                ID_COMPETENCIA         = o.ID_COMPETENCIA,
                CL_COMPETENCIA         = o.CL_COMPETENCIA,
                NB_COMPETENCIA         = o.NB_COMPETENCIA,
                DS_COMPETENCIA         = o.DS_COMPETENCIA,
                CL_TIPO_COMPETENCIA    = o.CL_TIPO_COMPETENCIA,
                CL_CLASIFICACION       = o.CL_CLASIFICACION,
                FG_ACTIVO              = o.FG_ACTIVO,
                XML_CAMPOS_ADICIONALES = o.XML_CAMPOS_ADICIONALES
            };

            return(q.FirstOrDefault());
        }
예제 #7
0
        private void CargarDatos()
        {
            CompetenciaNegocio nCompetencia = new CompetenciaNegocio();
            var vCompetencia = nCompetencia.ObtieneCompetencias(pIdCompetencia: vIdCompetencia).FirstOrDefault();

            CompetenciaNivelNegocio nCompetenciaNivel = new CompetenciaNivelNegocio();
            List <SPE_OBTIENE_C_COMPETENCIA_NIVEL_Result> vCompetenciaNivel = nCompetenciaNivel.ObtieneCompetenciaNivel(pIdCompetencia: vIdCompetencia);

            foreach (SPE_OBTIENE_C_COMPETENCIA_NIVEL_Result vobjetoCompetenciaNivel in vCompetenciaNivel)
            {
                if (vobjetoCompetenciaNivel.CL_NIVEL_COMPETENCIA.Equals("NIVEL_00"))
                {
                    radEditorPersona0.Content = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PERSONA;
                    radEditorPuesto0.Content  = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PUESTO;
                }
                if (vobjetoCompetenciaNivel.CL_NIVEL_COMPETENCIA.Equals("NIVEL_01"))
                {
                    radEditorPersona1.Content = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PERSONA;
                    radEditorPuesto1.Content  = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PUESTO;
                }
                if (vobjetoCompetenciaNivel.CL_NIVEL_COMPETENCIA.Equals("NIVEL_02"))
                {
                    radEditorPersona2.Content = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PERSONA;
                    radEditorPuesto2.Content  = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PUESTO;
                }
                if (vobjetoCompetenciaNivel.CL_NIVEL_COMPETENCIA.Equals("NIVEL_03"))
                {
                    radEditorPersona3.Content = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PERSONA;
                    radEditorPuesto3.Content  = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PUESTO;
                }
                if (vobjetoCompetenciaNivel.CL_NIVEL_COMPETENCIA.Equals("NIVEL_04"))
                {
                    radEditorPersona4.Content = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PERSONA;
                    radEditorPuesto4.Content  = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PUESTO;
                }
                if (vobjetoCompetenciaNivel.CL_NIVEL_COMPETENCIA.Equals("NIVEL_05"))
                {
                    radEditorPersona5.Content = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PERSONA;
                    radEditorPuesto5.Content  = vobjetoCompetenciaNivel.DS_NIVEL_COMPETENCIA_PUESTO;
                }
            }
            ClasificacionCompetenciaNegocio nCompetenciaClasificacion = new ClasificacionCompetenciaNegocio();

            var vClasificaciones = nCompetenciaClasificacion.ObtieneClasificacionCompetencia(pClTipoCompetecia: vCompetencia.CL_TIPO_COMPETENCIA);
            var vValorSelect     = nCompetenciaClasificacion.ObtieneClasificacionCompetencia(pClTipoCompetecia: vCompetencia.CL_TIPO_COMPETENCIA).FirstOrDefault();

            if (vClasificaciones.Count > 0)
            {
                cmbClasificaciones.ClearSelection();
                cmbClasificaciones.DataSource     = vClasificaciones;
                cmbClasificaciones.DataTextField  = "NB_CLASIFICACION_COMPETENCIA";
                cmbClasificaciones.DataValueField = "CL_CLASIFICACION";
                cmbClasificaciones.DataBind();
                cmbClasificaciones.SelectedValue = vValorSelect.CL_CLASIFICACION;
                cmbClasificaciones.Text          = vValorSelect.NB_CLASIFICACION_COMPETENCIA;
            }
            cmbClasificaciones.SelectedValue = vCompetencia.CL_CLASIFICACION;
            cmbClasificaciones.Text          = vCompetencia.NB_CLASIFICACION_COMPETENCIA;
            cmbCategoria.SelectedValue       = vCompetencia.CL_TIPO_COMPETENCIA;
            cmbCategoria.Text     = vCompetencia.NB_TIPO_COMPETENCIA;
            chkActivo.Checked     = vCompetencia.FG_ACTIVO;
            txtDescripcion.Text   = vCompetencia.DS_COMPETENCIA;
            txtClave.Text         = vCompetencia.CL_COMPETENCIA;
            txtNbCompetencia.Text = vCompetencia.NB_COMPETENCIA;
        }
예제 #8
0
        protected void btnSave_click(object sender, EventArgs e)
        {
            //GuardarDatos();

            string              tipo_transaccion = "";
            CompetenciaNegocio  nccompetencia    = new CompetenciaNegocio();
            E_COMPETENCIA_NIVEL vObjetoAgregar   = new E_COMPETENCIA_NIVEL();

            string clave           = txtClave.Text;
            string nbclasificacion = txtNbCompetencia.Text;
            string descripcion     = txtDescripcion.Text;


            //EDITAR
            if (!ptipo.Equals("Agregar"))
            {
                if (ptipo.Equals("Editar"))
                {
                    vObjetoAgregar.ID_COMPETENCIA = vIdCompetencia;
                    tipo_transaccion = E_TIPO_OPERACION_DB.A.ToString();
                }
                else
                {
                    tipo_transaccion = E_TIPO_OPERACION_DB.I.ToString();
                    vObjetoAgregar.ID_COMPETENCIA = 1;
                }



                vObjetoAgregar.CL_COMPETENCIA                  = txtClave.Text;
                vObjetoAgregar.NB_COMPETENCIA                  = txtNbCompetencia.Text;
                vObjetoAgregar.DS_COMPETENCIA                  = txtDescripcion.Text;
                vObjetoAgregar.CL_TIPO_COMPETENCIA             = cmbCategoria.SelectedValue;
                vObjetoAgregar.CL_CLASIFICACION                = cmbClasificaciones.SelectedValue;
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N0 = radEditorPersona0.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N0  = radEditorPuesto0.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N1 = radEditorPersona1.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N1  = radEditorPuesto1.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N2 = radEditorPersona2.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N2  = radEditorPuesto2.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N3 = radEditorPersona3.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N3  = radEditorPuesto3.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N4 = radEditorPersona4.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N4  = radEditorPuesto4.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N5 = radEditorPersona5.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N5  = radEditorPuesto5.Content.Replace("&lt;", "");
                vObjetoAgregar.XML_CAMPOS_ADICIONALES          = null;
                vObjetoAgregar.FG_ACTIVO = chkActivo.Checked;

                if (vObjetoAgregar.CL_COMPETENCIA != "" && vObjetoAgregar.NB_COMPETENCIA != "")
                {
                    E_RESULTADO vResultado = nccompetencia.InsertaActualizaCompetencia(pTipoTransaccion: tipo_transaccion, pClUsuario: vClUsuario, pNbPrograma: vNbPrograma, pCompetencia: vObjetoAgregar);
                    string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;
                    UtilMensajes.MensajeResultadoDB(rnMensaje, vMensaje, vResultado.CL_TIPO_ERROR);
                }
                else
                {
                    UtilMensajes.MensajeResultadoDB(rnMensaje, "Los campos Clave y Competencia no pueden ser vacios.", E_TIPO_RESPUESTA_DB.WARNING, pCallBackFunction: "");
                }
            }

            else
            {
                //AGREGAR



                radEditorPersona0.EditModes = radEditorPersona0.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPuesto0.EditModes  = radEditorPuesto0.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPersona1.EditModes = radEditorPersona1.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPuesto1.EditModes  = radEditorPuesto1.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPersona2.EditModes = radEditorPersona2.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPuesto2.EditModes  = radEditorPuesto2.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPersona3.EditModes = radEditorPersona3.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPuesto3.EditModes  = radEditorPuesto3.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPersona4.EditModes = radEditorPersona4.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPuesto4.EditModes  = radEditorPuesto4.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPersona5.EditModes = radEditorPersona5.EditModes ^ Telerik.Web.UI.EditModes.Html;
                radEditorPuesto5.EditModes  = radEditorPuesto5.EditModes ^ Telerik.Web.UI.EditModes.Html;


                vObjetoAgregar.ID_COMPETENCIA = 1;

                vObjetoAgregar.CL_COMPETENCIA                  = txtClave.Text;
                vObjetoAgregar.NB_COMPETENCIA                  = txtNbCompetencia.Text;
                vObjetoAgregar.DS_COMPETENCIA                  = txtDescripcion.Text;
                vObjetoAgregar.CL_TIPO_COMPETENCIA             = cmbCategoria.SelectedValue;
                vObjetoAgregar.CL_CLASIFICACION                = cmbClasificaciones.SelectedValue;
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N0 = radEditorPersona0.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N0  = radEditorPuesto0.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N1 = radEditorPersona1.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N1  = radEditorPuesto1.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N2 = radEditorPersona2.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N2  = radEditorPuesto2.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N3 = radEditorPersona3.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N3  = radEditorPuesto3.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N4 = radEditorPersona4.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N4  = radEditorPuesto4.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PERSONA_N5 = radEditorPersona5.Content.Replace("&lt;", "");
                vObjetoAgregar.DS_NIVEL_COMPETENCIA_PUESTO_N5  = radEditorPuesto5.Content.Replace("&lt;", "");
                vObjetoAgregar.XML_CAMPOS_ADICIONALES          = null;
                vObjetoAgregar.FG_ACTIVO = chkActivo.Checked;

                if (vObjetoAgregar.CL_COMPETENCIA != "" && vObjetoAgregar.NB_COMPETENCIA != "")
                {
                    E_RESULTADO vResultado = nccompetencia.InsertaActualizaCompetencia(pTipoTransaccion: E_TIPO_OPERACION_DB.I.ToString(), pClUsuario: vClUsuario, pNbPrograma: vNbPrograma, pCompetencia: vObjetoAgregar);
                    string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;
                    UtilMensajes.MensajeResultadoDB(rnMensaje, vMensaje, vResultado.CL_TIPO_ERROR);
                }
                else
                {
                    UtilMensajes.MensajeResultadoDB(rnMensaje, "Los campos Clave y Competencia no pueden ser vacios.", E_TIPO_RESPUESTA_DB.WARNING, pCallBackFunction: "");
                }
            }
        }
예제 #9
0
        protected void grvCompetencias_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            CompetenciaNegocio negocio = new CompetenciaNegocio();

            grvCompetencias.DataSource = negocio.ObtieneCompetencias();
        }