Пример #1
0
 public XElement InsertarFactorTabulador(string pClTipoOperacion, E_EMPLEADOS_SELECCIONADOS vEmpleados, string usuario, string programa)
 {
     using (context = new SistemaSigeinEntities())
     {
         ObjectParameter poutClaveRetorno = new ObjectParameter("XML_RESULTADO", typeof(XElement));
         context.SPE_INSERTA_TABULADOR_FACTOR(poutClaveRetorno, vEmpleados.ID_TABULADOR, vEmpleados.XML_ID_SELECCIONADOS, usuario, programa, pClTipoOperacion, vEmpleados.ID_TABULADOR_FACTOR);
         return(XElement.Parse(poutClaveRetorno.Value.ToString()));
     }
 }
        protected void CargarDatosCompetencia(String pIdsSeleccionados)
        {
            List <int> vSeleccionados = null;

            if (pIdsSeleccionados != null & pIdsSeleccionados != "")
            {
                vSeleccionados = JsonConvert.DeserializeObject <List <int> >(pIdsSeleccionados);
            }

            E_EMPLEADOS_SELECCIONADOS vEmpleados = new E_EMPLEADOS_SELECCIONADOS();

            vEmpleados.ID_TABULADOR = vIdTabulador;

            vSeleccionCompetencias = new List <E_SELECCIONADOS>();
            foreach (int item in vSeleccionados)
            {
                vSeleccionCompetencias.Add(new E_SELECCIONADOS {
                    ID_SELECCIONADO = item
                });
            }
            var vXelements = vSeleccionCompetencias.Select(x =>
                                                           new XElement("COMPETENCIA",
                                                                        new XAttribute("ID_COMPETENCIA", x.ID_SELECCIONADO)
                                                                        ));
            XElement SELECCIONADOS =
                new XElement("COMPETENCIAS", vXelements
                             );

            vEmpleados.XML_ID_SELECCIONADOS = SELECCIONADOS.ToString();
            string             vNiveles   = null;
            TabuladoresNegocio nTabulador = new TabuladoresNegocio();
            E_RESULTADO        vResultado = nTabulador.InsertaActualizaTabuladorFactor(pClTipoOperacion: E_TIPO_OPERACION_DB.I.ToString(), vEmpleados: vEmpleados, pNiveles: vNiveles, usuario: vClUsuario, programa: vNbPrograma);
            string             vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

            grdCompetenciasSeleccionadas.Rebind();
            //UtilMensajes.MensajeResultadoDB(rwmMensaje, vMensaje, vResultado.CL_TIPO_ERROR, pCallBackFunction: "onCloseWindowC");
        }
Пример #3
0
        public E_RESULTADO InsertarFactorTabulador(String pClTipoOperacion, E_EMPLEADOS_SELECCIONADOS vEmpleados, string usuario, string programa)
        {
            TabuladoresOperaciones operaciones = new TabuladoresOperaciones();

            return(UtilRespuesta.EnvioRespuesta(operaciones.InsertarFactorTabulador(pClTipoOperacion, vEmpleados, usuario, programa)));
        }
Пример #4
0
        protected void btnGuardar_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["IDFactor"] != null)
            {
                vTipoTransaccion = E_TIPO_OPERACION_DB.A.ToString();
            }
            else
            {
                vTipoTransaccion = E_TIPO_OPERACION_DB.I.ToString();
            }

            E_EMPLEADOS_SELECCIONADOS vEmpleados = new E_EMPLEADOS_SELECCIONADOS();
            TabuladoresNegocio        nTabulador = new TabuladoresNegocio();

            vEmpleados.ID_TABULADOR_FACTOR = vIdCompetencia;

            XElement vXmlCompetencia = new XElement("COMPETENCIAS",
                                                    new XElement("COMPETENCIA",
                                                                 new XAttribute("NB_COMPETENCIA", txtNombre.Text),
                                                                 new XAttribute("DS_COMPETENCIA", txtDescripccion.Text)));

            XElement vXmlNiveles = new XElement("NIVELES",
                                                new XElement("NIVEL",
                                                             new XAttribute("CL_NIVEL_FACTOR", "NIVEL_00"),
                                                             new XAttribute("NB_FACTOR_NIVEL", "NIVEL 0"),
                                                             new XAttribute("DS_NIVEL_FACTOR_PUESTO", radEditorPuesto0.Content),
                                                             new XAttribute("NO_VALOR_NIVEL", 0)
                                                             ),
                                                new XElement("NIVEL",
                                                             new XAttribute("CL_NIVEL_FACTOR", "NIVEL_01"),
                                                             new XAttribute("NB_FACTOR_NIVEL", "NIVEL 1"),
                                                             new XAttribute("DS_NIVEL_FACTOR_PUESTO", radEditorPuesto1.Content),
                                                             new XAttribute("NO_VALOR_NIVEL", 1)
                                                             ),
                                                new XElement("NIVEL",
                                                             new XAttribute("CL_NIVEL_FACTOR", "NIVEL_02"),
                                                             new XAttribute("NB_FACTOR_NIVEL", "NIVEL 2"),
                                                             new XAttribute("DS_NIVEL_FACTOR_PUESTO", radEditorPuesto2.Content),
                                                             new XAttribute("NO_VALOR_NIVEL", 2)
                                                             ),
                                                new XElement("NIVEL",
                                                             new XAttribute("CL_NIVEL_FACTOR", "NIVEL_03"),
                                                             new XAttribute("NB_FACTOR_NIVEL", "NIVEL 3"),
                                                             new XAttribute("DS_NIVEL_FACTOR_PUESTO", radEditorPuesto3.Content),
                                                             new XAttribute("NO_VALOR_NIVEL", 3)
                                                             ),
                                                new XElement("NIVEL",
                                                             new XAttribute("CL_NIVEL_FACTOR", "NIVEL_04"),
                                                             new XAttribute("NB_FACTOR_NIVEL", "NIVEL 4"),
                                                             new XAttribute("DS_NIVEL_FACTOR_PUESTO", radEditorPuesto4.Content),
                                                             new XAttribute("NO_VALOR_NIVEL", 4)
                                                             ),
                                                new XElement("NIVEL",
                                                             new XAttribute("CL_NIVEL_FACTOR", "NIVEL_05"),
                                                             new XAttribute("NB_FACTOR_NIVEL", "NIVEL 5"),
                                                             new XAttribute("DS_NIVEL_FACTOR_PUESTO", radEditorPuesto5.Content),
                                                             new XAttribute("NO_VALOR_NIVEL", 5)
                                                             )
                                                );

            vEmpleados.XML_ID_SELECCIONADOS = vXmlCompetencia.ToString();
            vEmpleados.ID_TABULADOR         = vIdTabulador;

            E_RESULTADO vResultado = nTabulador.InsertaActualizaTabuladorFactor(pClTipoOperacion: vTipoTransaccion.ToString(), vEmpleados: vEmpleados, pNiveles: vXmlNiveles.ToString(), usuario: vClUsuario, programa: vNbPrograma);
            string      vMensaje   = vResultado.MENSAJE.Where(w => w.CL_IDIOMA.Equals(vClIdioma.ToString())).FirstOrDefault().DS_MENSAJE;

            UtilMensajes.MensajeResultadoDB(rwmMensaje, vMensaje, vResultado.CL_TIPO_ERROR);
        }