Exemple #1
0
        /// <summary>
        /// 根据RoleID获取角色权限列表
        /// </summary>
        /// <param name="roleID">roleID</param>
        /// <returns></returns>
        public JsonResult GetRightsByRoleID(string roleID)
        {
            UserDbContext udb  = new UserDbContext("ConnStr1");
            List <Rights> list = udb.GetRightsByRoleID(roleID);

            var list2 = from r in list
                        select new
            {
                RightName = r.RightName
            };

            JsonResult jr = Json(list2.ToList(), JsonRequestBehavior.AllowGet);

            return(jr);
        }