/// <summary>
        /// 试题预览
        /// </summary>
        /// <returns></returns>
        public ActionResult PreviewTopic(EntryExaminationListPagingModel command, int taskItemId)
        {
            if (command.PageNumber <= 0)
            {
                command.PageNumber = 1;
            }
            var model     = new EntryTiMuModel();
            var booktimus = _bookWorkTaskItemService.GetBookTiMus(taskItemId);

            for (var i = 0; i < booktimus.Count; i++)
            {
                var tbbr    = new TiMuBuiltRequest(tiMu: booktimus[i].Timu, index: (i + 1).ToString(), applicationUrl: "http://" + Request.Url.Authority);
                var tmbuder = new TiMuBuild(tbbr);
                model.TiMulIsList.Add(tmbuder.AssemblyTimu());
            }
            var taskItem = _bookWorkTaskItemService.GetBookWorkTaskItemsById(taskItemId);

            model.BookWorkTask    = taskItem.BookWorkTask;
            model.BookChapterList = _bookChapterService.GetParentListById(taskItem.ChapterId);
            return(View(model));
        }
        // GET: EntryExamination
        public ActionResult Index(EntryExaminationModel model, EntryExaminationListPagingModel command)
        {
            if (command.PageNumber <= 0)
            {
                command.PageNumber = 1;
            }
            if (null == model)
            {
                model = new EntryExaminationModel();
            }
            var subject    = _subjectService.GetSubjectList();
            var selectList = new List <SelectListItem>()
            {
                new SelectListItem()
                {
                    Text = "请选择", Value = string.Empty
                }
            };

            subject.ForEach(d =>
            {
                selectList.Add(new SelectListItem()
                {
                    Text = d.Name, Value = d.Id.ToString()
                });
            });
            model.SubjectList = selectList;
            int?userid = null;

            if (!_workContext.CurrentCustomer.IsAdmin())
            {
                userid = _workContext.CurrentCustomer.Id;
            }
            var bookTasks = _bookWorkTaskService.GetAllTasks(userId: userid, taskStatus: TaskStatus.Entry, subjectId: model.SubjectId, pageIndex: command.PageNumber - 1,
                                                             pageSize: command.PageSize);

            model.BookTaskInfoList = bookTasks;
            model.EntryExaminationListPagingModel.LoadPagedList(bookTasks);
            return(View(model));
        }
        /// <summary>
        /// 被撤回任务
        /// </summary>
        /// <returns></returns>
        public ActionResult Revocation(EntryExaminationModel model, EntryExaminationListPagingModel command)
        {
            if (command.PageNumber <= 0)
            {
                command.PageNumber = 1;
            }
            if (null == model)
            {
                model = new EntryExaminationModel();
            }
            int?userid = null;

            if (!_workContext.CurrentCustomer.IsAdmin())
            {
                userid = _workContext.CurrentCustomer.Id;
            }
            var bookTasks = _bookWorkTaskService.GetAllTasks(userId: userid, taskStatus: TaskStatus.Revert, pageIndex: command.PageNumber - 1,
                                                             pageSize: command.PageSize);

            model.BookTaskInfoList = bookTasks;
            model.EntryExaminationListPagingModel.LoadPagedList(bookTasks);
            return(View(model));
        }
 public EntryTiMuModel()
 {
     EntryExaminationListPagingModel = new EntryExaminationListPagingModel();
     TiMulIsList = new List <TiMuModel>();
 }
 public EntryExaminationModel()
 {
     EntryExaminationListPagingModel = new EntryExaminationListPagingModel();
 }