public ActionResult Index() { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory)) { return(View(service.GetFiles())); } }
public JsonResult Setting(string id) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { return Json(service.Get(), JsonRequestBehavior.AllowGet); } }
public ActionResult Edit(string id) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { return(View(service.Get())); } }
public ActionResult Index() { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory)) { return View(service.GetFiles()); } }
public ActionResult Edit(string id) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { return View(service.Get()); } }
public JsonResult Setting(string id) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { return(Json(service.Get(), JsonRequestBehavior.AllowGet)); } }
public JsonResult Setting([Required] string id, FormCollection formCollection) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { var settings = service.Get(); TryUpdateModel(settings, formCollection); service.Set(settings); return Json(settings); } }
public JsonResult Setting([Required] string id, FormCollection formCollection) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { var settings = service.Get(); TryUpdateModel(settings, formCollection); service.Set(settings); return(Json(settings)); } }
public ActionResult Edit(string id, FormCollection formCollection) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { var settings = service.Get(); TryUpdateModel(settings, formCollection); service.Set(settings); return(RedirectToAction("Edit", new { id })); } }
public ActionResult Edit(string id, FormCollection formCollection) { using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id)) { var settings = service.Get(); TryUpdateModel(settings, formCollection); service.Set(settings); return RedirectToAction("Edit", new { id }); } }