public ActionResult GetOptions() { var brands = CacheAccess.GetBrand(_brandContract, true, false); var brandOptions = brands.Select(s => new { s.Text, s.Value }).ToList(); var categories = CacheAccess.GetCategorys(_categoryContract).Select(s => new SelectListItem() { Text = s.CategoryName, Value = s.Id.ToString() }); var categoryOptions = categories.Select(s => new { Text = s.Text, Value = s.Value }).ToList(); categoryOptions.Insert(0, new { Text = "请选择品类", Value = "" }); var seasons = CacheAccess.GetSeason(_seasonContract, true); var seasonOptions = seasons.Select(s => new { s.Text, s.Value }).ToList(); //var storeOptions = _storeContract .Stores.Where(s => !s.IsDeleted && s.IsEnabled && s.IsAttached) // .Select(s => new { Text = s.StoreName, Value = s.Id }) // .ToList(); // storeOptions.Insert(0, new { Text = "请选择店铺", Value = 0 }); return(Json(new OperationResult(OperationResultType.Success, string.Empty, new { brandOptions, categoryOptions, seasonOptions, //storeOptions }), JsonRequestBehavior.AllowGet)); }
public ActionResult BitchProduct() { ViewBag.storages = CacheAccess.GetOrderStorages(_storageContract, true); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true); ViewBag.Categor = CacheAccess.GetCategory(_categoryContract, true); ViewBag.Season = CacheAccess.GetSeason(_seasonContract, true); return(PartialView()); }
public ActionResult GetProductsByStore(string storeId) { ViewBag.storeid = storeId; ViewBag.Season = CacheAccess.GetSeason(_seasonContract, true); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true); ViewBag.Categories = CacheAccess.GetCategory(_categoryContract, true); return(PartialView()); }
public ActionResult VProduct() { ViewBag.Color = CacheAccess.GetColorsName(_colorContract, true); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true, false); ViewBag.Category = CacheAccess.GetCategory(_categoryContract, true); ViewBag.Season = CacheAccess.GetSeason(_seasonContract, true); ViewBag.Crowds = CacheAccess.GetProductCrowd(_productCrowdContract, true); return(PartialView()); }
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 ActionResult Index() { ViewBag.Seasons = CacheAccess.GetSeason(_seasonContract, true); return(View()); }