public ActionResult UserMsgPage(string type, int pageSize, int pageNum = 1) { int totalCount = 0; switch (type) { case "Breply": ViewBag.Breplys = BlogCommentReplyDataSvc.GetPagedEntitys(ref pageNum, pageSize, b => (b.OwnerID != CurrentUser.ID && b.ToUserID == CurrentUser.ID) || (b.OwnerID == CurrentUser.ID && b.ToUserID != CurrentUser.ID), b => b.InsertDate, true, out totalCount).ToList(); break; case "Bcomment": ViewBag.Bcomments = BlogCommentDataSvc.GetPagedEntitys(ref pageNum, pageSize, b => b.OwnerID == CurrentUser.ID, b => b.InsertDate, true, out totalCount).ToList(); break; case "Nreply": ViewBag.Nreplys = NewBeeFloorReplyDataSvc.GetPagedEntitys(ref pageNum, pageSize, n => (n.OwnerID != CurrentUser.ID && n.ToUserID == CurrentUser.ID) || (n.OwnerID == CurrentUser.ID && n.ToUserID != CurrentUser.ID), n => n.InsertDate, true, out totalCount).ToList(); break; case "Ncomment": ViewBag.Ncomments = NewBeeFloorDataSvc.GetPagedEntitys(ref pageNum, pageSize, n => n.OwnerID == CurrentUser.ID, n => n.InsertDate, true, out totalCount).ToList(); break; } ViewBag.TotalCount = totalCount; ViewBag.CurrentPage = pageNum; ViewBag.Type = type; ViewBag.CUserID = CurrentUser.ID; return(View()); }
public ActionResult BlogCommentReplyPage(Guid commentID, int corder, int pageSize, int pageNum = 1) { int totalCount; ViewBag.Login = CurrentUser != null; ViewBag.BlogCommentReplyList = BlogCommentReplyDataSvc.GetPagedEntitys(ref pageNum, pageSize, it => it.BlogCommentID == commentID, it => it.InsertDate, false, out totalCount).ToList(); ViewBag.TotalCount = totalCount; ViewBag.CurrentPage = pageNum; ViewBag.COrder = corder; if (ViewBag.Login) { DisabledUser user = MyRedisDB.GetSet <DisabledUser>(MyRedisKeys.DisabledUsers).Where(d => d.UserID == CurrentUser.ID && d.ObjectType == (int)EnumObjectType.姿势 && d.AbleDate > DateTime.Now).FirstOrDefault(); if (user != null) { ViewBag.DisableMsg = "你被封禁至" + user.AbleDate.ToString("yyyy-MM-dd HH:ss"); } ViewBag.CUID = CurrentUser.ID; } return(View()); }