/// <summary> /// 初始化商品列表界面 /// </summary> /// <returns></returns> public ActionResult Products() { ViewBag.Category = CacheAccess.GetCategory(_categoryContract, true); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true, false); ViewBag.Color = (_colorContract.SelectList("请选择").Select(m => new SelectListItem { Text = m.Key, Value = m.Value })).ToList(); return(PartialView()); }
public ProductDiscountController(IBrandContract brandContract, IStoreContract storeContract, ISeasonContract seasonContract, IColorContract colorContract, ISizeContract sizeContract, IProductDiscountContract productDiscountContract, IProductContract productContract, ICategoryContract categoryContract, IProductAttributeContract productAttributeContract, IProductOrigNumberContract ProductOrigNumberContract, IInventoryContract invenrtoryContract) { _brandContract = brandContract; _storeContract = storeContract; _seasonContract = seasonContract; _colorContract = colorContract; _sizeContract = sizeContract; _productContract = productContract; _productDiscountContract = productDiscountContract; _categoryContract = categoryContract; _productAttributeContract = productAttributeContract; _ProductOrigNumberContract = ProductOrigNumberContract; _invenrtoryContract = invenrtoryContract; ViewBag.Brand = (_brandContract.SelectList().Select(m => new SelectListItem { Text = m.Key, Value = m.Value })).ToList(); ViewBag.Season = (_seasonContract.SelectList().Select(m => new SelectListItem { Text = m.Key, Value = m.Value })).ToList(); ViewBag.Color = (_colorContract.SelectList().Select(m => new SelectListItem { Text = m.Key, Value = m.Value })).ToList(); ViewBag.Size = (_sizeContract.SelectList().Select(m => new SelectListItem { Text = m.Key, Value = m.Value })).ToList(); ViewBag.Discount = StaticHelper.DiscountList("选择折扣"); }