Exemple #1
0
        //检查是否是超级管理员,不是则跳转到登陆页
        public static void CheckAdministerAndRedirect()
        {
            LoginMember info = Security.Check();

            if (info == null)
            {
                HttpContext.Current.Response.Redirect("adminlogin.aspx");
                HttpContext.Current.Response.End();
            }

            if (!info.IsAdministrator)
            {
                HttpContext.Current.Response.Redirect("adminlogin.aspx");
                HttpContext.Current.Response.End();
            }
        }