Beispiel #1
0
        /// <summary>
        /// 获取培训班的人员
        /// </summary>
        /// <param name="classId"></param>
        /// <param name="userIds"></param>
        /// <param name="username"></param>
        /// <param name="realname"></param>
        /// <param name="postName"></param>
        /// <param name="deptName"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        public JsonResult GetClassUserList(int classId, string userIds, string username, string realname,
                                           string postName, string deptName,
                                           int pageSize = int.MaxValue, int pageIndex = 1)
        {
            int[] userId = userIds.GetArray();
            var   list   = _classManager.GetTrainClassToUsers(classId, userId, username, realname, postName, deptName,
                                                              pageIndex, pageSize);
            var itemArray = list.Select(p => new
            {
                p.UserId,
                p.Username,
                p.Realname,
                DeptName = p.DeptName,
                p.IsJoinSurvey,
                p.PostName,
            });

            return(Json(new { dataList = itemArray, recordCount = list.TotalItemCount }, JsonRequestBehavior.AllowGet));
        }