Exemple #1
0
        public ActionResult Index(int?status, int pageSize = 10, int pageNo = 1)
        {
            if (!status.HasValue)
            {
                status = 0;
            }

            CouponRecordQuery query = new CouponRecordQuery();

            query.UserId   = CurrentUser.Id;
            query.PageNo   = pageNo;
            query.PageSize = pageSize;
            query.Status   = status;
            var model = _iCouponService.GetCouponRecordList(query);

            var shopBonus = _iShopBonusService.GetDetailByQuery(query);


            #region 分页控制
            PagingInfo info = new PagingInfo
            {
                CurrentPage  = pageNo,
                ItemsPerPage = pageSize,
                TotalItems   = model.Total + shopBonus.Total
            };
            ViewBag.pageInfo = info;
            ViewBag.Bonus    = shopBonus.Models.ToList();
            ViewBag.State    = query.Status;
            #endregion
            return(View(model.Models.ToList()));
        }
 public static ObsoletePageModel <ShopBonusReceiveInfo> GetDetailByQuery(CouponRecordQuery query)
 {
     return(_iShopBonusService.GetDetailByQuery(query));
 }