/// <summary> /// 作者专题页 /// </summary> /// <param name="accountid"></param> /// <param name="PageNo"></param> /// <returns></returns> public ActionResult TopicPage(string accountid, int PageNo = 1) { if (accountid == null) { return(Redirect("/")); } var user = UserInfo.GetUserInfoBySn(accountid); if (user == null) { return(Redirect("/")); } var topic = Topic.GetTopicByAccountId(accountid); if (topic == null) { return(Redirect("/")); } var topicArticles = ArticleListManager.GetTopicArticleList(accountid, true); Pages p = new Pages(topicArticles.Count, 50); p.CurrentPageNo = PageNo; ViewBag.Pages = p; ViewData.Model = p.GetList(topicArticles); ViewBag.Title = topic.Title; return(View()); }
/// <summary> /// 管理专题 /// </summary> /// <param name="PageNo"></param> /// <returns></returns> public ActionResult ManagerTopic(int PageNo = 1) { if (Session[ConstHelper.Session_USERID] == null) { return(Redirect("/")); } string accountid = Session[ConstHelper.Session_USERID].ToString(); var topicArticles = ArticleListManager.GetTopicArticleList(accountid, false); Pages p = new Pages(topicArticles.Count, 50); p.CurrentPageNo = PageNo; ViewBag.Pages = p; ViewBag.Title = "管理专题"; ViewData.Model = p.GetList(topicArticles); return(View()); }