コード例 #1
0
        public ActionResult Satisfied(int pageSize = 15, int pageNo = 1)
        {
            var query = new OrderQuery();

            query.PageNo   = pageNo;
            query.PageSize = pageSize;
            query.Status   = Entities.OrderInfo.OrderOperateStatus.Finish;
            query.UserId   = CurrentUser.Id;
            query.Sort     = "CommentCount";
            query.IsAsc    = true;

            var model = OrderApplication.GetOrders(query);

            ViewBag.Comments = CommentApplication.GetOrderCommentByOrder(model.Models.Select(p => p.Id));

            #region 分页控制
            PagingInfo info = new PagingInfo
            {
                CurrentPage  = pageNo,
                ItemsPerPage = pageSize,
                TotalItems   = model.Total
            };
            ViewBag.pageInfo = info;
            #endregion
            ViewBag.Keyword  = string.IsNullOrWhiteSpace(SiteSettings.SearchKeyword) ? SiteSettings.Keyword : SiteSettings.SearchKeyword;
            ViewBag.Keywords = SiteSettings.HotKeyWords;
            return(View(model.Models));
        }