// GET: Message public ActionResult Index(int type) { ViewBag.type = type.ToString(); ViewBag.active = "Message/Index?type=" + type.ToString(); if (Session["user"] != null) { User user = (User)Session["user"]; ViewBag.user = user; ViewBag.followNotice = NoticeDB.FindAllNoticeByUserIdNType(user.id, "follow"); ViewBag.likeNotice = NoticeDB.FindAllNoticeByUserIdNType(user.id, "like"); ViewBag.commentNotice = NoticeDB.FindAllNoticeByUserIdNType(user.id, "comment"); ViewBag.replyNotice = NoticeDB.FindAllNoticeByUserIdNType(user.id, "reply"); } return(View()); }