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(); } }
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(); } }