/// <summary> /// 更新数据 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ActionResult Update(int Id) { MemberTypeDto dto = _memberTypeContract.Edit(Id); ViewBag.Discount = StaticHelper.DiscountList("选择折扣"); return(PartialView(dto)); }
public ActionResult CreateDiscount() { ViewBag.Color = CacheAccess.GetColorsName(_colorContract); // ViewBag.Color = (_colorContract.SelectList("选择颜色").Select(m => new SelectListItem { Text = m.Key, Value = m.Value })).ToList(); ViewBag.Brand = CacheAccess.GetBrand(_brandContract); ViewBag.Category = CacheAccess.GetCategory(_categoryContract); ViewBag.Season = CacheAccess.GetSeason(_seasonContract, false); // ViewBag.Size = CacheAccess.GetSize(_sizeContract, _categoryContract); ViewBag.Discount = StaticHelper.DiscountList("选择折扣"); ViewBag.OneCollo = CacheAccess.GetOneCollo(_productAttributeContract, false); return(View()); }
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("选择折扣"); }
/// <summary> /// 初始化添加界面 /// </summary> /// <returns></returns> public ActionResult Create() { ViewBag.Discount = StaticHelper.DiscountList("选择折扣"); return(PartialView()); }