コード例 #1
0
        public ActionResult Pricesetting(int?page)
        {
            if (IsAdmin)
            {
                PaginationInfo      paging = new PaginationInfo();
                IList <BeautyPrice> users  = iprice.Get(null, null, 1, page.HasValue ? page.Value : 1, null, out paging);

                PagedList <BeautyPrice> models = users.ToPagedList <BeautyPrice>(paging);

                return(View(models));
            }

            return(View());
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: fengzijun/Beauty
        public ActionResult ProcessTrx()
        {
            PaginationInfo         paging  = new PaginationInfo();
            IList <BeautyPrice>    prices  = iprice.Get(null, null, 1, 0, null, out paging);
            IList <SelectListItem> paylist = new List <SelectListItem>();

            foreach (BeautyPrice s in prices)
            {
                paylist.Add(new SelectListItem {
                    Text = s.Pricename, Value = s.PromotionPrice.HasValue?s.PromotionPrice.Value.ToString():s.Price.ToString()
                });
            }
            paylist.Add(new SelectListItem {
                Text = "自定义", Value = ""
            });
            ViewBag.Paylist = paylist;
            return(View());
        }