public static void Create(int galleryId, string title, string url, string linkName, DateTime date, IEnumerable <GalleryImageModel> images) { var rep = DependencyResolver.Current.GetService <IBulletinRepository>(); url = HttpUtility.HtmlEncode(url); var bulletin = new GalleryBulletin { GalleryId = galleryId, Title = new TitleTextBoxProperty { Value = title }, Link = new ReadMoreLinkProperty { Value = linkName, Link = url }, SiteId = 1, Date = date, BulletinType = new BulletinType(rep.FetchType("Gallery")), Images = images.ToList() }; bulletin.MarkNew(); bulletin.Save(rep); }
private void UpdateBulletin() { GalleryBulletin.Update(Id, Title, "Gallery/View/" + Id, "Read More", CreatedDate, Images.Take(3)); }