public JsonResult Update(string language, string type, string documents) { ViewBag.DocumentLanguageList = DocumentUtils.GetDocumentLanguageList(); ViewBag.DocumentTypeList = DocumentUtils.GetDocumentTypeList(); string json = JsonConvert.SerializeObject(documents); //write string to file string path = Server.MapPath(string.Format(json_file_path, language, type)); System.IO.File.WriteAllText(path, string.Empty); System.IO.File.WriteAllText(path, documents); return(Json(documents)); }
// GET: /Schema/ public ActionResult Index() { ViewBag.DocumentLanguageList = DocumentUtils.GetDocumentLanguageList(); ViewBag.DocumentTypeList = DocumentUtils.GetDocumentTypeList(); return(View()); }