Esempio n. 1
0
        public ModificationUpdateViewModel SaveText(string name, string text, StaticTextFormatType format, string username)
        {
            var formatType = Mapper.Map <StaticTextFormat>(format);
            var result     = new SaveStaticTextWork(m_staticTextRepository, name, text, formatType, username).Execute();

            return(result);
        }
Esempio n. 2
0
        public ModificationUpdateViewModel SaveText(string name, string scope, string text, string culture, StaticTextFormatType format,
                                                    string username)
        {
            //scope = m_dictionaryScopeResolver.GetDictionaryScope(scope);
            var dynamicText = new DynamicText
            {
                Culture          = culture,
                DictionaryScope  = scope,
                Format           = (short)format,
                ModificationUser = username,
                Name             = name,
                Text             = text
            };

            m_dynamicTextService.SaveDynamicText(dynamicText);

            var result = new ModificationUpdateViewModel
            {
                ModificationTime = DateTime.Now.ToString(m_localizationService.GetRequestCulture()),
                User             = username
            };

            return(result);
        }