public ActionResult Index()
 {
     using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory))
     {
         return(View(service.GetFiles()));
     }
 }
Exemple #2
0
 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());
     }
 }
Exemple #6
0
 public JsonResult Setting(string id)
 {
     using (var service = new SettingsDirectoryService(BasicHelper.ConfigurationDirectory).GetService(id))
     {
         return(Json(service.Get(), JsonRequestBehavior.AllowGet));
     }
 }
Exemple #7
0
 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);
     }
 }
Exemple #8
0
 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 });
            }
        }