Esempio n. 1
0
        public void UpdateTimeZone(int id, string name)
        {
            using (IUnitOfWork work = UnitOfWork.Begin())
            {
                TimeZone timeZone = _timeZoneRepository.FindById(id);
                var      old_name = timeZone.Name;

                var message = new XElement(XMLLogLiterals.LOG_MESSAGE);
                message.Add(XMLLogMessageHelper.TemplateToXml("LogMessageTimeZoneNameChanged", new List <string> {
                    old_name, name
                }));
                timeZone.Name = name;

                _logService.CreateLog(CurrentUser.Get().Id, "web", CurrentUser.Get().HostName, CurrentUser.Get().CompanyId,
                                      message.ToString());
                work.Commit();
            }
        }