예제 #1
0
    protected void btn_bloquearAgregar_Click(object sender, EventArgs e)
    {
        SolicitudAndenesBC s = new SolicitudAndenesBC();
        string             resultado;

        s.LUGA_ID = int.Parse(this.ddl_bloquearPos.SelectedValue);
        s.SOLI_ID = int.Parse(this.hf_idSolicitud.Value);

        if (s.Bloquear(this.u.ID, out resultado))
        {
            this.gv_bloqueo.DataSource = s.ObtenerBloqueados();
            this.gv_bloqueo.DataBind();
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", string.Format("showAlert('{0}');", resultado), true);
        }
        else
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "msj", string.Format("alert('{0}');", resultado), true);
        }
    }
예제 #2
0
    protected void btn_bloquearAgregar_Click(object sender, EventArgs e)
    {
        SolicitudAndenesBC s = new SolicitudAndenesBC();
        string             resultado;

        s.LUGA_ID = Convert.ToInt32(ddl_bloquearPos.SelectedValue);
        s.SOLI_ID = Convert.ToInt32(hf_idSolicitud.Value);

        if (s.Bloquear(usuario.ID, out resultado))
        {
            gv_bloqueo.DataSource = s.ObtenerBloqueados();
            gv_bloqueo.DataBind();
            utils.ShowMessage(this, resultado, "success", true);
        }

        else
        {
            utils.ShowMessage(this, resultado, "error", false);
        }
    }