public ActionResult StoreScopeConfiguration() { var allStores = _storeService.GetAllStores(); if (allStores.Count < 2) return Content(""); var model = new StoreScopeConfigurationModel() { StoreId = this.GetActiveStoreScopeConfiguration(_storeService, _workContext) }; foreach (var store in allStores) { model.AllStores.Add(new SelectListItem() { Text = store.Name, Selected = (store.Id == model.StoreId), Value = Url.Action("ChangeStoreScopeConfiguration", "Setting", new { storeid = store.Id, returnUrl = Request.RawUrl }) }); } model.AllStores.Insert(0, new SelectListItem() { Text = _localizationService.GetResource("Admin.Common.StoresAll"), Selected = (0 == model.StoreId), Value = Url.Action("ChangeStoreScopeConfiguration", "Setting", new { storeid = 0, returnUrl = Request.RawUrl }) }); return PartialView(model); }
public ActionResult StoreScopeConfiguration() { var allStores = _storeService.GetAllStores(); if (allStores.Count < 2) return Content(""); var model = new StoreScopeConfigurationModel(); foreach (var s in allStores) { model.Stores.Add(new StoreModel() { Id = s.Id, Name = s.Name }); } model.StoreId = this.GetActiveStoreScopeConfiguration(_storeService, _workContext); return PartialView(model); }