Пример #1
0
        //========================
        public static string GetGalleryExportXML(Guid siteID, List <Guid> GalleryIDs)
        {
            GalleryExportList lstGE = new GalleryExportList();

            lstGE.ExportDate        = SiteData.CurrentSite.Now;
            lstGE.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion;
            lstGE.OriginalSite      = SiteData.GetSiteFromCache(siteID);

            GalleryHelper gh = new GalleryHelper(siteID);

            foreach (Guid galleryID in GalleryIDs)
            {
                GalleryExport ge  = new GalleryExport();
                GalleryGroup  gal = gh.GalleryGroupGetByID(galleryID);

                ge.TheGallery        = gal;
                ge.OriginalGalleryID = gal.GalleryID;
                ge.ExportDate        = SiteData.CurrentSite.Now;
                ge.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion;

                lstGE.TheGalleries.Add(ge);
            }

            return(ContentImportExportUtils.GetExportXML <GalleryExportList>(lstGE));
        }
		//========================
		public static string GetGalleryExportXML(Guid siteID, List<Guid> GalleryIDs) {

			GalleryExportList lstGE = new GalleryExportList();
			lstGE.ExportDate = SiteData.CurrentSite.Now;
			lstGE.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion;
			lstGE.OriginalSite = SiteData.GetSiteFromCache(siteID);

			GalleryHelper gh = new GalleryHelper(siteID);
			
			foreach (Guid galleryID in GalleryIDs) {
				GalleryExport ge = new GalleryExport();
				GalleryGroup gal = gh.GalleryGroupGetByID(galleryID);

				ge.TheGallery = gal;
				ge.OriginalGalleryID = gal.GalleryID;
				ge.ExportDate = SiteData.CurrentSite.Now;
				ge.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion;

				lstGE.TheGalleries.Add(ge);
			}


			return ContentImportExportUtils.GetExportXML<GalleryExportList>(lstGE);
		}