Exemple #1
0
        /// <summary>
        /// Almacena la actualización del presupuesto egreso
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnEditarPartidaEgresoModal_Click(object sender, EventArgs e)
        {
            Entidades.PresupuestoEgresoPartida partidaEgreso = new Entidades.PresupuestoEgresoPartida();
            Double salario  = 0;
            String txtMonto = txtMontoNuevoEditar.Text.Replace(".", ",");

            if (Double.TryParse(txtMonto, out salario))
            {
                partidaEgreso.idPresupuestoEgreso = Convert.ToInt32(idPresupuestoEditar.Text);
                partidaEgreso.idPartida           = Convert.ToInt32(idPartidaEditar.Text);
                partidaEgreso.monto       = salario;
                partidaEgreso.descripcion = txtDescripcionEditar.Text;
                presupuestoServicios.editarPresupuestoEgresoPartida(partidaEgreso);

                int idPartida = (int)Session["idPartidaVer"];
                PresupuestoEgresoPartida presupuestoEgresoBuscar = new PresupuestoEgresoPartida();
                presupuestoEgresoBuscar.idPartida = idPartida;

                LinkedList <PresupuestoEgresoPartida> presupuestos = new LinkedList <PresupuestoEgresoPartida>();

                presupuestos = presupuestoServicios.presupuestoEgresoPartidasPorPresupuesto(presupuestoEgresoBuscar);
                Session["listaPresupuestosEgresosPartida"] = presupuestos;
                presupuestoEgresosPorPartida();
                MostrarDatosTabla();

                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "#modalMostrarPresupuestoEgresos", "$('body').removeClass('modal-open');$('.modal-backdrop').remove();$('#modalMostrarPresupuestoEgresos').hide();", true);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "activar", "activarModalMostrarPresupuestoEgresos();", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "#modalEditarPartidaEgreso", "$('body').removeClass('modal-open');$('.modal-backdrop').remove();$('#modalEditarPartidaEgreso').hide();", true);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "activar", "activarModalEditarPartidaEgreso();", true);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "toastr.error('" + "El monto asignado es incorrecto" + "');", true);
            }
        }
Exemple #2
0
        /// <summary>
        /// Josseline M
        /// Muestra el detalle de las partidas de egreso en función al número de partida
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnVerPartidasEgreso_Click(object sender, EventArgs e)
        {
            Entidades.PresupuestoEgresoPartida presupuestoEgresoBuscar = new Entidades.PresupuestoEgresoPartida();

            LinkedList <Entidades.PresupuestoEgresoPartida> presupuestos = new LinkedList <Entidades.PresupuestoEgresoPartida>();
            int idPartida = Convert.ToInt32((((LinkButton)(sender)).CommandArgument).ToString());

            Session["idPartidaVer"]           = idPartida;
            presupuestoEgresoBuscar.idPartida = idPartida;

            presupuestos = presupuestoServicios.presupuestoEgresoPartidasPorPresupuesto(presupuestoEgresoBuscar);
            Session["listaPresupuestosEgresosPartida"] = presupuestos;
            presupuestoEgresosPorPartida();

            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "#modalMostrarPresupuestoEgresos", "$('body').removeClass('modal-open');$('.modal-backdrop').remove();$('#modalMostrarPresupuestoEgresos').hide();", true);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "activar", "activarModalMostrarPresupuestoEgresos();", true);
        }
Exemple #3
0
        /// <summary>
        /// Almacena la actualización del presupuesto egreso
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnEliminarPartidaEgresoModal_Click(object sender, EventArgs e)
        {
            Entidades.PresupuestoEgresoPartida partidaEgreso = new Entidades.PresupuestoEgresoPartida();

            partidaEgreso.idPresupuestoEgreso = Convert.ToInt32(idPresupuestoEliminar.Text);
            partidaEgreso.idPartida           = Convert.ToInt32(idPartidaEliminar.Text);

            presupuestoServicios.eliminarPresupuestoEgresoPartida(partidaEgreso);

            int idPartida = (int)Session["idPartidaVer"];
            PresupuestoEgresoPartida presupuestoEgresoBuscar = new PresupuestoEgresoPartida();

            presupuestoEgresoBuscar.idPartida = idPartida;

            LinkedList <PresupuestoEgresoPartida> presupuestos = new LinkedList <PresupuestoEgresoPartida>();

            presupuestos = presupuestoServicios.presupuestoEgresoPartidasPorPresupuesto(presupuestoEgresoBuscar);
            Session["listaPresupuestosEgresosPartida"] = presupuestos;
            presupuestoEgresosPorPartida();
            MostrarDatosTabla();

            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "#modalMostrarPresupuestoEgresos", "$('body').removeClass('modal-open');$('.modal-backdrop').remove();$('#modalMostrarPresupuestoEgresos').hide();", true);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "activar", "activarModalMostrarPresupuestoEgresos();", true);
        }