Beispiel #1
0
        /// <summary>
        /// 角色权限
        /// </summary>
        public void gerPermissions()
        {
            BLL.NJ.UserPermissionsBLL permissionsBLL = new BLL.NJ.UserPermissionsBLL();
            var r     = HttpContext.Current.Request.Form["mucc"];
            var table = permissionsBLL.GetPermissions(r);
            JavaScriptSerializer js = new JavaScriptSerializer();
            string str = js.Serialize(table);

            HttpContext.Current.Response.Write(str);
            HttpContext.Current.Response.End();
        }
Beispiel #2
0
        /// <summary>
        /// 删除权限
        /// </summary>
        public void getDelPer()
        {
            BLL.NJ.UserPermissionsBLL dep = new BLL.NJ.UserPermissionsBLL();
            var s = HttpContext.Current.Request.Form["bumen"];
            var d = HttpContext.Current.Request.Form["mucc"];
            var r = dep.getDelPer(d, s);
            JavaScriptSerializer js = new JavaScriptSerializer();
            var obj = new { msg = "删除失败", code = 201 };

            if (r)
            {
                obj = new { msg = "删除成功", code = 200 };
            }
            string str = js.Serialize(obj);

            HttpContext.Current.Response.Write(str);
            HttpContext.Current.Response.End();
        }