コード例 #1
0
        public ActionResult GetRoleMenuPrivilege(long?role)
        {
            var tree = new List <TreeNode>();
            var user = Session[Constants.USER_KEY] as User;

            tree = sysRoleBll.GetUserRoleMenuPrivilegeTree(user.SysOperator.ID, role);
            return(Json(tree, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        private ActionResult GetRoleMenuPrivilege()
        {
            var  strRole = Request["role"];
            long?role    = null;
            long temp;

            if (long.TryParse(strRole, out temp))
            {
                role = temp;
            }
            var user = Session[Constants.USER_KEY] as User;
            var tree = sysRoleBll.GetUserRoleMenuPrivilegeTree(user.SysOperator.ID, role);

            return(Json(tree, JsonRequestBehavior.AllowGet));
        }