Ejemplo n.º 1
0
 public StyleLogItem(StyleLog model)
     : this()
 {
     Id        = model.Id;
     Name      = model.Name;
     SessionId = model.SessionId;
     ChangeLog = model.ChangeLog;
     Created   = model.Created;
 }
Ejemplo n.º 2
0
 public StyleManageModel(StyleLog log)
     : this()
 {
     Id                = log.StyleId;
     Name              = log.Name;
     CdnUrl            = log.CdnUrl;
     Content           = log.Content;
     IncludeIntoEditor = log.IncludeIntoEditor;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Update data and create change log
        /// </summary>
        /// <param name="styleLog"></param>
        /// <param name="styleLogModel"></param>
        /// <returns></returns>
        private string ChangeLog(StyleLog styleLog, StyleLogManageModel styleLogModel)
        {
            var          changeLog = new StringBuilder();
            const string format    = "- Update field: {0}\n";

            if (!ConvertUtilities.Compare(styleLog.Name, styleLogModel.Name))
            {
                changeLog.AppendFormat(format, "Name");
                styleLog.Name = styleLogModel.Name;
            }
            if (!ConvertUtilities.Compare(styleLog.Content, styleLogModel.Content))
            {
                changeLog.AppendFormat(format, "Content");
                styleLog.Content = styleLogModel.Content;
            }

            if (!string.IsNullOrEmpty(changeLog.ToString()))
            {
                changeLog.Insert(0, "** Update Style **\n");
            }

            return(changeLog.ToString());
        }
Ejemplo n.º 4
0
 internal ResponseModel Delete(StyleLog styleLog)
 {
     return(_styleLogRepository.Delete(styleLog));
 }
Ejemplo n.º 5
0
 internal ResponseModel Update(StyleLog styleLog)
 {
     return(_styleLogRepository.Update(styleLog));
 }
Ejemplo n.º 6
0
 internal ResponseModel Insert(StyleLog styleLog)
 {
     return(_styleLogRepository.Insert(styleLog));
 }