public ActionResult View(int Id, string tabName) { var resul = _saleCampaignContract.SalesCampaigns.Where(c => c.Id == Id).FirstOrDefault(); var originStoreId = resul.StoresIds.Split(",", true); var storeIds = originStoreId.Select(id => int.Parse(id)).ToList(); var selectItemList = _storeContract.QueryManageStore(AuthorityHelper.OperatorId.Value) .Select(s => new SelectListItem() { Text = s.StoreName, Value = s.Id.ToString() }) .ToList(); selectItemList.Each(item => { if (originStoreId.Contains(item.Value)) { item.Selected = true; } }); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, false, false); ViewBag.Stores = selectItemList; ViewBag.TabName = tabName; return(PartialView(resul)); }
public FactoryOnlineController(IStoreContract storeContract, IStorageContract storageContract, IGalleryContract galleryContract, IInventoryContract inventoryContract, IStoreCartContract storeCartContract, IProductContract prodcutContract, IAdministratorContract administratorContract, IStoreCartItemContract storeCartItemContract, IColorContract colorContract, IProductContract productContract, IProductOrigNumberContract _productOrigNumberContract, IBrandContract _brandContract, IPurchaseContract _purchaseContract, IDesignerContract _DesignerContract, IFactorysContract _factoryContract, ICategoryContract categoryContract) { _storeContract = storeContract; _storageContract = storageContract; _storeCartContract = storeCartContract; _productContract = prodcutContract; _storeCartItemContract = storeCartItemContract; _colorContract = colorContract; _categoryContract = categoryContract; this._brandContract = _brandContract; this._administratorContract = administratorContract; this._productOrigNumberContract = _productOrigNumberContract; ViewBag.Color = _colorContract.ParentSelectList("请选择"); ViewBag.Category = CacheAccess.GetCategory(_categoryContract, true); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true); this._purchaseContract = _purchaseContract; this._DesignerContract = _DesignerContract; this._factoryContract = _factoryContract; }
public OnlineController(IStoreContract storeContract, IStorageContract storageContract, IGalleryContract galleryContract, IInventoryContract inventoryContract, IStoreCartContract storeCartContract, IProductContract prodcutContract, IAdministratorContract administratorContract, IStoreCartItemContract storeCartItemContract, IColorContract colorContract, IOnlinePurchaseProductContract oppContract, IProductContract productContract, IProductOrigNumberContract _productOrigNumberContract, IStoreTypeContract _storeTypeContract, IBrandContract _brandContract, ICategoryContract categoryContract) { _storeContract = storeContract; _storageContract = storageContract; //_galleryContract = galleryContract; //_inventoryContract = inventoryContract; _storeCartContract = storeCartContract; _productContract = prodcutContract; _storeCartItemContract = storeCartItemContract; _colorContract = colorContract; _categoryContract = categoryContract; _oppContract = oppContract; this._brandContract = _brandContract; this._administratorContract = administratorContract; this._productOrigNumberContract = _productOrigNumberContract; ViewBag.Color = _colorContract.ParentSelectList("请选择"); ViewBag.Category = CacheAccess.GetCategory(_categoryContract, true); ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true); this._storeTypeContract = _storeTypeContract; }
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 Index() { ViewBag.Categories = _categoryContract.ParentSelectList("请选择品类").ToList(); ViewBag.Brands = CacheAccess.GetBrand(_brandContract, true); ViewBag.Colors = CacheAccess.GetColorsName(_colorContract, true); return(View()); }
public ActionResult Index() { var li = CacheAccess.GetFactorys(_factorysContract, true); ViewBag.GetFactorys = li; ViewBag.GetBrand = CacheAccess.GetBrand(_brandContract, true, false); return(View()); }
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()); }
/// <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 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 Index() { ViewBag.Brands = CacheAccess.GetBrand(_brandContract, true); var data = _adminContract.GetDesignerStoreStorageList(AuthorityHelper.OperatorId.Value); ViewBag.DesignerInfo = data; return(View()); }
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()); }
/// <summary> /// 收货详情 /// </summary> /// <param name="startDate">开始日期</param> /// <param name="endDate">结束日期</param> /// <param name="type">0:发货,1:收货</param> /// <returns></returns> public ActionResult GetOrderblankDetail(int storeId, DateTime startDate, DateTime endDate, int type) { if (endDate == startDate) { endDate = startDate.AddDays(1).AddSeconds(-1); } ViewBag.StartDate = startDate.ToString("yyyy-MM-dd"); ViewBag.EndDate = endDate.ToString("yyyy-MM-dd"); ViewBag.StoreId = storeId; ViewBag.Type = type; ViewBag.Brands = CacheAccess.GetBrand(_brandContract, true, false); return(PartialView(new Orderblank())); }
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 Update(int Id) { var result = _factorysContract.View(Id); Mapper.CreateMap <Factorys, FactorysDto>(); FactorysDto dto = Mapper.Map <Factorys, FactorysDto>(result); ViewBag.Departments = CacheAccess.GetDepartmentListItem(_DepartmentContract, true, DepartmentTypeFlag.设计); ViewBag.Brands = CacheAccess.GetBrand(_brandContract, true, false); ViewBag.Stores = result.Department.Stores.Where(w => w.IsEnabled && !w.IsDeleted).Select(s => new SelectListItem { Value = s.Id + "", Text = s.StoreName, }).ToList(); ViewBag.Storages = _StoreContract.Stores.Where(w => w.IsEnabled && !w.IsDeleted && w.Id == result.StoreId).SelectMany(s => s.Storages) .Where(w => w.IsEnabled && !w.IsDeleted).Select(s => new SelectListItem { Value = s.Id + "", Text = s.StorageName, }).ToList(); return(PartialView(dto)); }
public ActionResult Create() { ViewBag.GetFactorys = CacheAccess.GetFactorys(_factorysContract, true); ViewBag.GetBrand = CacheAccess.GetBrand(_brandContract, false, false); return(PartialView()); }
public ActionResult Index() { ViewBag.Brands = CacheAccess.GetBrand(_brandContract, true); return(View()); }
public ActionResult Create() { ViewBag.Departments = CacheAccess.GetDepartmentListItem(_DepartmentContract, true, DepartmentTypeFlag.设计); ViewBag.Brands = CacheAccess.GetBrand(_brandContract, true, false); return(PartialView()); }
public ActionResult GetProductList() { ViewBag.Brand = CacheAccess.GetBrand(_brandContract, true); return(PartialView()); }