예제 #1
0
        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);
        }
예제 #2
0
        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 }));
        }
예제 #3
0
        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"));
        }