private bool Update() { string content = string.Empty; if (this.ContentItems.Count < 1) { //use legacy items otherSettings.Content = this.content; otherSettings.CssClass = this.cssClass; otherSettings.MobileCssClass = this.mobileCssClass; otherSettings.FeaturedImage = this.featuredImage; try { content = Json.Encode(otherSettings); } catch (System.ArgumentException ex) { content = this.content; } } else { try { content = JsonConvert.SerializeObject(this.ContentItems); } catch (JsonSerializationException ex) { content = this.content; } } bool result = DBLinks.UpdateLink( this.itemID, this.moduleID, this.title, this.url, this.viewOrder, content, this.createdDate, this.target, this.createdByUser); //IndexHelper.IndexItem(this); if (result) { ContentChangedEventArgs e = new ContentChangedEventArgs(); OnContentChanged(e); } return(result); }
private bool Update() { bool result = DBLinks.UpdateLink( this.itemID, this.moduleID, this.title, this.url, this.viewOrder, this.description, this.createdDate, this.target, this.createdByUser); //IndexHelper.IndexItem(this); if (result) { ContentChangedEventArgs e = new ContentChangedEventArgs(); OnContentChanged(e); } return(result); }