public StyleLogItem(StyleLog model) : this() { Id = model.Id; Name = model.Name; SessionId = model.SessionId; ChangeLog = model.ChangeLog; Created = model.Created; }
public StyleManageModel(StyleLog log) : this() { Id = log.StyleId; Name = log.Name; CdnUrl = log.CdnUrl; Content = log.Content; IncludeIntoEditor = log.IncludeIntoEditor; }
/// <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()); }
internal ResponseModel Delete(StyleLog styleLog) { return(_styleLogRepository.Delete(styleLog)); }
internal ResponseModel Update(StyleLog styleLog) { return(_styleLogRepository.Update(styleLog)); }
internal ResponseModel Insert(StyleLog styleLog) { return(_styleLogRepository.Insert(styleLog)); }