コード例 #1
0
 /// <summary>
 /// 判断用户是否是管理员
 /// </summary>
 /// <returns></returns>
 public bool UserCanSystemAdmin()
 {
     // 1.先判断是否已登录
     if (WebUtil.CheckIsLogon())
     {
         // 2.有没有管理员审核的权限?
         if (!IsAuthorized("SystemAdmin"))
         {
             //HttpContext.Current.Response.Redirect(WebUtil.UserLogonPage);
             Response.Write("<script>window.top.location.href='" + WebUtil.UserLogonPage + "'</script>");
             return(false);
         }
     }
     else
     {
         return(false);
     }
     return(true);
 }