Example #1
0
        public virtual void UpdateStaticText(
            string name,
            string cultureName,
            string dictionaryScopeName,
            short format,
            string text,
            string modificationUser,
            DateTime modificationTime
            )
        {
            using (var session = GetSession())
            {
                var staticTextRepository = new StaticTextRepository(session);

                var staticTextEntity = staticTextRepository.GetByNameAndCultureAndScope(
                    name, cultureName, dictionaryScopeName
                    );

                staticTextEntity.Format           = format;
                staticTextEntity.Text             = text;
                staticTextEntity.ModificationUser = modificationUser;
                staticTextEntity.ModificationTime = modificationTime;

                staticTextRepository.Update(staticTextEntity);
                session.Flush();
            }
        }
Example #2
0
        public virtual StaticTextEntity GetByNameAndCultureAndScope(
            string name, string cultureName, string dictionaryScopeName
            )
        {
            using (var session = GetSession())
            {
                var staticTextRepository = new StaticTextRepository(session);

                var result = staticTextRepository.GetByNameAndCultureAndScope(
                    name, cultureName, dictionaryScopeName
                    );

                return(result);
            }
        }
Example #3
0
        public virtual void Delete(
            string name,
            string cultureName,
            string dictionaryScopeName
            )
        {
            using (var session = GetSession())
            {
                var staticTextRepository = new StaticTextRepository(session);

                var staticTextEntity = staticTextRepository.GetByNameAndCultureAndScope(
                    name, cultureName, dictionaryScopeName
                    );

                staticTextRepository.Delete(staticTextEntity);
                session.Flush();
            }
        }