public static void Create(int articleId, string title, string url, string linkName, EditableDivProperty content, DateTime date, ImageProperty image) { var rep = DependencyResolver.Current.GetService <IBulletinRepository>(); url = HttpUtility.HtmlEncode(url); var bulletin = new NewsBulletin { 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 }, SiteId = 1, Date = date, BulletinType = new BulletinType(rep.FetchType("news")), Image = image }; bulletin.MarkNew(); bulletin.Save(rep); }
internal override void UpdateBulletin() { var content = EditableContent[0]; NewsBulletin.Update(Id, Title.Value, "Article/View/" + Id, "Read More", content, Date, GetBulletinImage()); }