public XElement InsertaActualiza_C_MODULO(string tipo_transaccion, E_MODULO_OCUPACION V_C_MODULO, string usuario, string programa)
        {
            using (context = new SistemaSigeinEntities())
            {
                //Declaramos el objeto de valor de retorno
                ObjectParameter pout_clave_retorno = new ObjectParameter("XML_RESULTADO", typeof(XElement));
                //  pout_clave_retorno.Value = "";
                context.SPE_INSERTA_ACTUALIZA_C_MODULO(pout_clave_retorno, V_C_MODULO.ID_MODULO, V_C_MODULO.CL_MODULO, V_C_MODULO.NB_MODULO, V_C_MODULO.FG_ACTIVO, V_C_MODULO.CL_AREA, V_C_MODULO.CL_SUBAREA, usuario, programa, tipo_transaccion);

                return(XElement.Parse(pout_clave_retorno.Value.ToString()));
            }
        }
        protected void btnGuardarModulo_Click(object sender, EventArgs e)
        {
            if (cmbArea.SelectedValue != "" && cmbSubarea.SelectedValue != "")
            {
                string vClArea    = cmbArea.SelectedValue;
                string vClSubarea = cmbSubarea.SelectedValue;

                E_MODULO_OCUPACION vModuloAgregar = new E_MODULO_OCUPACION();
                string             vAccion        = (pID != null ? "A" : "I");

                if (vAccion == "I")
                {
                    vModuloAgregar.CL_MODULO  = txtClave.Text;
                    vModuloAgregar.NB_MODULO  = txtModulo.Text;
                    vModuloAgregar.FG_ACTIVO  = true;
                    vModuloAgregar.CL_AREA    = vClArea;
                    vModuloAgregar.CL_SUBAREA = vClSubarea;

                    E_RESULTADO resultado = negocio.InsertaActualiza_C_MODULO(vAccion, vModuloAgregar, vClUsuario, vNbPrograma);
                    UtilMensajes.MensajeResultadoDB(rnMensaje, resultado.MENSAJE[0].DS_MENSAJE.ToString(), resultado.CL_TIPO_ERROR, 400, 150);
                }
                else
                {
                    vModuloAgregar.ID_MODULO  = pID;
                    vModuloAgregar.CL_MODULO  = txtClave.Text;
                    vModuloAgregar.NB_MODULO  = txtModulo.Text;
                    vModuloAgregar.FG_ACTIVO  = true;
                    vModuloAgregar.CL_AREA    = vClArea;
                    vModuloAgregar.CL_SUBAREA = vClSubarea;

                    E_RESULTADO resultado = negocio.InsertaActualiza_C_MODULO(vAccion, vModuloAgregar, vClUsuario, vNbPrograma);
                    UtilMensajes.MensajeResultadoDB(rnMensaje, resultado.MENSAJE[0].DS_MENSAJE.ToString(), resultado.CL_TIPO_ERROR, 400, 150);
                }
            }
            else
            {
                UtilMensajes.MensajeResultadoDB(rnMensaje, "Debes llenar todos los campos", E_TIPO_RESPUESTA_DB.WARNING, 400, 150, null);
            }
        }
示例#3
0
        public E_RESULTADO InsertaActualiza_C_MODULO(string tipo_transaccion, E_MODULO_OCUPACION V_C_MODULO, string usuario, string programa)
        {
            OcupacionesOperaciones operaciones = new OcupacionesOperaciones();

            return(UtilRespuesta.EnvioRespuesta(operaciones.InsertaActualiza_C_MODULO(tipo_transaccion, V_C_MODULO, usuario, programa)));
        }