public SiteExport(Guid siteID) { SiteData s = null; List <ContentPageExport> pages = null; s = SiteData.GetSiteByID(siteID); pages = ContentImportExportUtils.ExportAllSiteContent(siteID); SetVals(s, pages); }
public SiteExport(Guid siteID, ExportType exportWhat) { SiteData s = null; List <ContentPageExport> pages = new List <ContentPageExport>(); s = SiteData.GetSiteByID(siteID); if (exportWhat == ExportType.AllData) { pages = ContentImportExportUtils.ExportAllSiteContent(siteID); } else { if (exportWhat == ExportType.ContentData) { List <ContentPageExport> lst = ContentImportExportUtils.ExportPages(siteID); pages = pages.Union(lst).ToList(); } if (exportWhat == ExportType.BlogData) { List <ContentPageExport> lst = ContentImportExportUtils.ExportPosts(siteID); pages = pages.Union(lst).ToList(); } } this.TheUsers = (from u in ExtendedUserData.GetUserList() select new SiteExportUser { Email = u.Email, Login = u.UserName, FirstName = u.FirstName, LastName = u.LastName, UserNickname = u.UserNickName }).ToList(); SetVals(s, pages); }