예제 #1
0
        /// <summary>
        /// 获取用户角色列表
        /// </summary>
        /// <returns></returns>
        public JsonResult Users_getRoleList()
        {
            DaUserGroup dal = new DaUserGroup();
            IList<UserGroup> users = dal.getList();

            var result = new CustomJsonResult();
            result.Data = new { total = users.Count, rows = users };
            return result;
        }
예제 #2
0
        /// <summary>
        /// 修改权限组
        /// </summary>
        /// <param name="id"></param>
        /// <param name="groupID"></param>
        /// <returns></returns>
        public JsonResult Users_editRole(string id, string groupID)
        {
            DaUserGroup dal = new DaUserGroup();
            UserInfo en = new UserInfo();
            en.id = Convert.ToInt32(id);
            en.powergroupID = groupID;

            var result = new CustomJsonResult();
            result.Data = dal.update(en);
            return result;
        }