public void Save() { GalleryHelper gh = new GalleryHelper(this.SiteID); Dictionary <int, string> lstImages = ParseGalleryImages(); int iPos = 0; foreach (var img in lstImages) { if (!string.IsNullOrEmpty(img.Value)) { var theImg = gh.GalleryImageEntryGetByFilename(this.GalleryID, img.Value); if (theImg == null) { theImg = new GalleryImageEntry(); theImg.GalleryImage = img.Value; theImg.GalleryImageID = Guid.NewGuid(); theImg.GalleryID = this.GalleryID; } theImg.ImageOrder = iPos; theImg.Save(); } iPos++; List <string> lst = (from l in lstImages select l.Value.ToLower()).ToList(); gh.GalleryImageCleanup(this.GalleryID, lst); } }
public void Save() { GalleryHelper gh = new GalleryHelper(this.SiteID); Dictionary<int, string> lstImages = ParseGalleryImages(); int iPos = 0; foreach (var img in lstImages) { if (!string.IsNullOrEmpty(img.Value)) { var theImg = gh.GalleryImageEntryGetByFilename(this.GalleryID, img.Value); if (theImg == null) { theImg = new GalleryImageEntry(); theImg.GalleryImage = img.Value; theImg.GalleryImageID = Guid.NewGuid(); theImg.GalleryID = this.GalleryID; } theImg.ImageOrder = iPos; theImg.Save(); } iPos++; List<string> lst = (from l in lstImages select l.Value.ToLower()).ToList(); gh.GalleryImageCleanup(this.GalleryID, lst); } }