public void Save([Required, FromBody] List <TranslationRecordTS> body, string type, string?culture) { Type t = TypeLogic.GetType(type); CultureInfo?c = culture == null ? null : CultureInfo.GetCultureInfo(culture); var records = GetTranslationRecords(body, t); TranslatedInstanceLogic.SaveRecords(records, t, c); }
public ActionResult SaveView(string type, string culture, string filter) { Type t = TypeLogic.GetType(type); var records = GetTranslationRecords(t); var c = culture == null ? null : CultureInfo.GetCultureInfo(culture); TranslatedInstanceLogic.SaveRecords(records, t, c); return(RedirectToAction("View", new { type = type, culture = culture, filter = filter, searchPressed = true })); }
public ActionResult SaveSync(string type, string culture) { Type t = TypeLogic.GetType(type); var c = CultureInfo.GetCultureInfo(culture); List <TranslationRecord> records = GetTranslationRecords(t); TranslatedInstanceLogic.SaveRecords(records, t, c); return(RedirectToAction("Index")); }