public ActionResult Index() { var settings = new SettingsModel(); settings.TempDir = _configProvider.GetValue("TempDir", "download", true); settings.CompleteDir = _configProvider.GetValue("CompleteDir", "complete", true); return View(settings); }
public ActionResult Index(SettingsModel model) { if (ModelState.IsValid) { _configProvider.SetValue("TempDir", model.TempDir); _configProvider.SetValue("CompleteDir", model.CompleteDir); //return RedirectToAction("index"); } return RedirectToAction("index", "Sabnzbd"); }