public void Article_OnBeforeSave(object sender, ArticleEventArgs e) { int count = 0; var tempList = EditableContent; tempList.ForEach(ec => { if (ec.Deleted) { EditableContent.Remove(ec); if (Images != null) { Images.ForEach(i => { if (i.Position.Contains(string.Format("{0}-", (count)))) { i.Position = "gal"; } }); } } count++; }); EditableContent = tempList; }
/* ---------------------------------------------------------------------------------------------------------- */ #region Class Members #endregion /* ---------------------------------------------------------------------------------------------------------- */ #region Constructors/Initialisation public RibbonItemContent() { ContentType = ContentType.EditableContent; Content = new EditableContent(); }
public EditableContent SaveEditableContent(EditableContent editableContent) { return(_contentRepository.Save(editableContent)); }