public ActionResult UserCommentList(int p, int size = 20) { Pager pager = new Pager(); pager.PageNo = p; pager.PageSize = size; pager = myService.GetReplyPaging(pager, 1, 0, user: User.Identity.Name); ViewBag.PageNo = p; ViewBag.PageCount = pager.PageCount; AjaxPager ajaxpager = new AjaxPager(3, p, pager.PageCount); ViewBag.AjaxPager = ajaxpager.getPageInfoHtml(); return PartialView("_UserComment", pager.Entity); }
public ActionResult UserNoteList(int p, int size = 20) { Pager pager = new Pager(); pager.PageNo = p; pager.PageSize = size; pager = myService.GetArticlePaging(pager, 6, 0, user: User.Identity.Name); ViewBag.PageNo = p; ViewBag.PageCount = pager.PageCount; AjaxPager ajaxpager = new AjaxPager(3, p, pager.PageCount); ViewBag.AjaxPager = ajaxpager.getPageInfoHtml(); if (pager.Amount > 0) { blog_varticle varticle = (pager.Entity as IQueryable<blog_varticle>).First(); CategoryModel category = myService.GetCategoryByID(varticle.cateid); ViewBag.NoteUrl = WebUtils.GetCateUrl(category); } return PartialView("_UserNote", pager.Entity); }
/// <summary> /// 评论列表(异步) /// </summary> public ActionResult CommentList(int id, int? p) { int page = (p ?? 1) > 0 ? (p ?? 1) : 1; Pager pager = new Pager(); pager.PageNo = page; pager.PageSize = configinfo.CommentPagerCount; pager = myService.GetReplyPaging(pager, id); ViewBag.PageNo = page; ViewBag.PageCount = pager.PageCount; ViewBag.ArticleId = id; AjaxPager ajaxpager = new AjaxPager(3, page, pager.PageCount); ViewBag.AjaxPager = ajaxpager.getPageInfoHtml(); return PartialView("_CommentList", pager.Entity); }