public ActionResult CheckTaskProperty(int taskitemId, int taskId)
        {
            var model = new CheckTaskPropertyModel {
                TaskItemId = taskitemId, TaskId = taskId
            };
            var booktimus = _bookWorkTaskItemService.GetBookTiMus(taskitemId);
            var task      = _bookWorkTaskService.GetBookWorkTask(taskId);
            var taskitem  = _bookWorkTaskItemService.GetBookWorkTaskItemsById(taskitemId);

            model.BookTimus = booktimus;
            model.Task      = task;
            model.TaskItem  = taskitem;
            var checkTiMuModels = new List <CheckTiMuModel>();

            foreach (var booktimu in booktimus)
            {
                var checkTiMuModel = new CheckTiMuModel();
                var timu           = _tiMuService.GeTiMuById(booktimu.Id);
                var tbbr           = new TiMuBuiltRequest(tiMu: timu);
                var tmbuder        = new TiMuBuild(tbbr);
                var tiMuModel      = tmbuder.AssemblyTimu();
                checkTiMuModel.TiMuModel   = tiMuModel;
                checkTiMuModel.LargeNumber = booktimu.LargeNumber;
                checkTiMuModel.SmallNumber = booktimu.SmallNumber;
                checkTiMuModel.PageNumber  = booktimu.PageNumber;
                checkTiMuModels.Add(checkTiMuModel);
            }
            model.TiMuModels = checkTiMuModels;
            var taskItem = _bookWorkTaskItemService.GetBookWorkTaskItemsById(taskitemId);

            model.RelateAllChapters = _bookChapterService.GetParentListById(taskItem.ChapterId);
            return(View(model));
        }
        public ActionResult MarkTaskProperty(int taskitemId, int taskId, Guid?tmid = null)
        {
            var model = new MarkPropertyModel {
                TaskId = taskId, TaskItemId = taskitemId
            };
            var timuList = _bookWorkTaskItemService.GetBookTiMus(taskitemId);

            model.BookTimus = timuList;//包含的题目
            //需要展示的题目
            model.Tmid = tmid ?? timuList.First().Id;
            var timu = _tiMuService.GeTiMuById(model.Tmid);

            model.BookTiMu = timu.BookTiMu;
            var tbbr    = new TiMuBuiltRequest(tiMu: timu);
            var tmbuder = new TiMuBuild(tbbr);

            model.TiMuModel = tmbuder.AssemblyTimu();
            var taskItem = _bookWorkTaskItemService.GetBookWorkTaskItemsById(taskitemId);

            model.RelateAllChapters = _bookChapterService.GetParentListById(taskItem.ChapterId);
            return(View(model));
        }
        /// <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));
        }