Ejemplo n.º 1
0
        public ActionResult Index(SettingsModel model)
        {
            if (ModelState.IsValid)
            {
                _settings.SetSetting<int>("CommissionPercentage", model.CommissionPercentage);
                RedirectToAction("Index");
            }

            return View(model);
        }
Ejemplo n.º 2
0
 public ActionResult Index()
 {
     var model = new SettingsModel();
     model.CommissionPercentage = _settings.GetSettingByKey<int>("CommissionPercentage");
     return View(model);
 }