internal override void UpdateBulletin() { var content = EditableContent[0]; var summary = Ratings.Single(r => r.Type == "Summary"); ReviewBulletin.Update(Id, Title.Value, "Article/Review/" + Id, "Read More", content, Date, GetBulletinImage(), summary); }
public static void Create(int articleId, string title, string url, string linkName, EditableDivProperty content, DateTime date, ImageProperty image, RatingProperty summary) { var bRep = DependencyResolver.Current.GetService <IBulletinRepository>(); url = HttpUtility.HtmlEncode(url); var bulletin = new ReviewBulletin { ArticleId = articleId, Title = new TitleTextBoxProperty { Value = title }, Link = new ReadMoreLinkProperty { Value = linkName, Link = url }, ViewContent = new StandardTextProperty { Value = content.Value, Type = content.Type, CssClass = content.CssClass }, Summary = summary, SiteId = 1, Date = date, BulletinType = new BulletinType(bRep.FetchType("review")), Image = image }; bulletin.MarkNew(); bulletin.Save(bRep); }