Exemple #1
0
        public JsonResult GetClassList(int classType, string trainname = "", string startTime = "", string endTime = "",
                                       string username = "", int approvestatus = -1, int issignup = -1, int pageIndex = 1, int pageSize = 20)
        {
            var list = _classManager.GetClassList(classType, classType == 0 ? 0 : CurrentUser.DeptId, trainname,
                                                  startTime, endTime, username, approvestatus, issignup, pageIndex, pageSize);
            var tmpArray = list.Select(p => new
            {
                p.ClassId,
                p.Code,
                p.TrainName,
                p.Number,
                p.DeptName,
                p.Realname,
                p.approveStatus_Human,
                p.ApproveStatus,
                p.UpdateType
            });

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