示例#1
0
        // GET: Message
        public ActionResult Index(int id = 1)
        {
            if (!Permission.LoginedNeed(Request, Response, Session))
            {
                return(null);
            }

            User user = (User)Session["user"];
            IOrderedQueryable <Message> messages = MessageView.GetRecivedMessage(user.uid);

            ViewBag.messages   = pager.GetPage(messages, id);
            ViewBag.page       = id;
            ViewBag.pageNumber = pager.GetPageNumber(messages);

            return(View());
        }