public ActionResult InDate() { LearnMyLearnBLL bll = new LearnMyLearnBLL(); Code.SiteCache cache = Code.SiteCache.Instance; int accountId = cache.LoginInfo.UserId; int partitionId = cache.LoginInfo.PartitionId; int recordCount = bll.GetInDateCount(accountId, partitionId); int pageSize = 8, pageIndex; int pageCount = (int)Math.Ceiling((double)recordCount / pageSize); int.TryParse(Request["PageIndex"], out pageIndex); if (pageCount == 0) { pageIndex = 0; } else { if (pageIndex < 1) pageIndex = 1; else if (pageIndex > pageCount) pageIndex = pageCount; } ViewBag.RecordCount = recordCount; ViewBag.PageCount = pageCount; ViewBag.PageIndex = pageIndex; ViewBag.PageSize = pageSize; return View(bll.GetInDateList(pageSize, pageIndex, "A.Id desc", accountId, partitionId)); }
//外部课程信息 public ActionResult OutCourse(int trainingId) { LearnMyLearnBLL bll = new LearnMyLearnBLL(); OutCourseInfo model = bll.GetOutCourse(trainingId); if (model == null) return Content("数据不存在,请刷新页面!"); return View(model); }