Beispiel #1
0
    //Modificar soportes bancarios
    protected void btnModificarSop_Click(object sender, EventArgs e)
    {
        int talon  = 0;
        int tipDoc = 0;

        if (ddlTipoDocEdit.Text != "")
        {
            tipDoc = int.Parse(ddlTipoDocEdit.Text);
        }
        if (txtTalonEdit.Text != "")
        {
            talon = int.Parse(txtTalonEdit.Text);
        }

        if (txtValorEdit.Text != "")
        {
            int registros = AdministrarSoportesBancarios.ModificarSoporteBancario(tipDoc, txtIdentificacionEdit.Text, txtReferenciaEdit.Text, talon, txtValorEdit.Text, int.Parse(txtSop_Id.Text));

            if (registros > 0)
            {
                //ClientScript.RegisterStartupScript(GetType(), "alert", "localStorage.setItem('tab', '#tab-2'); alert('" + "Se modificó el soporte exitosamente" + "');window.location.replace('/gestion/recaudoypago/soportebancario')", true);
                ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('Se modificó el soporte exitosamente');", true);
                formEditarSoporte.Visible = false;
                tablaSoporte.Visible      = true;
            }
            ConsultarDetalleSoportes();
        }


        else
        {
            ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('Faltan campos por llenar');", true);
        }
    }