コード例 #1
0
    protected void botonDesbloquear_Click(object sender, EventArgs e)
    {
        LinkButton  btnDesbloquear = sender as LinkButton;
        GridViewRow gridV          = (GridViewRow)btnDesbloquear.NamingContainer;
        string      estado         = ((Label)gridV.FindControl("Estado")).Text;

        if (estado.Equals(Constantes.ESTADO_BLOQUEADO))
        {
            new DaoReporte().desbloquearUsuario(Session[Constantes.USUARIO_CON_REPORTES].ToString());
            lB_Exito.CssClass = "alert alert-success";
            lB_Exito.Visible  = true;
            GridViewGestionUsuario.DataBind();
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EUsuario usuario = (EUsuario)(Session[Constantes.USUARIO_LOGEADO]);

        if (usuario == null)
        {
            Response.Redirect("~/Vistas/Home.aspx");
        }
        else if (usuario != null && usuario.Rol.Equals(Constantes.ROL_USER))
        {
            Response.Redirect("~/Vistas/Home.aspx");
        }
        else
        {
            GridViewGestionUsuario.DataBind();
        }
    }