Example #1
0
        public ActionResult Edit(ShopSetting model)
        {
            var setting = _repository.GetShopSetting(model.Id);
            int result;
            if (int.TryParse(model.Value, out result))
            {
                setting.Value = model.Value;
                WebSession.ShopSettings = _repository.GetShopSettings().ToList();
            }

            _repository.SaveShopSettings(setting);
            return RedirectToAction("Index");

        }
Example #2
0
 public void SaveShopSettings(ShopSetting shopSettings)
 {
     _store.SaveChanges();
 }