internal static void CopyContentLinks(int sourceSiteId, int destinationSiteId, out string result) { using (new QPConnectionScope()) { var rows = Common.CopyContentLinks(QPConnectionScope.Current.DbConnection, sourceSiteId, destinationSiteId); result = MultistepActionHelper.GetXmlFromDataRows(rows, "oldlink", "newlink"); } }
internal static string GetRelationsBetweenLinks(int sourceSiteId, int destinationSiteId) { using (new QPConnectionScope()) { var rows = Common.GetRelationsBetweenLinks(QPConnectionScope.Current.DbConnection, sourceSiteId, destinationSiteId); return(MultistepActionHelper.GetXmlFromDataRows(rows, "link")); } }
internal static void CopySiteTemplateObjectFormats(string relationsBetweenObjects, out string result) { using (var scope = new QPConnectionScope()) { var rows = Common.CopySiteTemplateObjectFormats(scope.DbConnection, relationsBetweenObjects); result = MultistepActionHelper.GetXmlFromDataRows(rows, "object_format"); } }
internal static void CopyContentConstraints(string relationsBetweenContentsXml, out string result) { using (new QPConnectionScope()) { var rows = Common.CopyContentConstraints(QPConnectionScope.Current.DbConnection, relationsBetweenContentsXml); result = MultistepActionHelper.GetXmlFromDataRows(rows, "constraint"); } }
internal static string GetRelationsBetweenAttributesXml(int sourceSiteId, int destinationSiteId, string contentIds, bool?forVirtualContents, bool byNewContents) { using (var scope = new QPConnectionScope()) { var rows = Common.GetRelationsBetweenAttributes(scope.DbConnection, sourceSiteId, destinationSiteId, contentIds, forVirtualContents, byNewContents); return(MultistepActionHelper.GetXmlFromDataRows(rows, "attribute")); } }
internal static string GetRelationsBetweenPages(string relationsBetweenTemplates) { using (var scope = new QPConnectionScope()) { var rows = Common.GetRelationsBetweenPages(scope.DbConnection, relationsBetweenTemplates); return(MultistepActionHelper.GetXmlFromDataRows(rows, "page")); } }
internal static string GetRelationsBetweenTemplates(int sourceSiteId, int destinationSiteId, int templateIdNew) { using (var scope = new QPConnectionScope()) { var rows = Common.GetRelationsBetweenTemplates(scope.DbConnection, sourceSiteId, destinationSiteId, templateIdNew); return(MultistepActionHelper.GetXmlFromDataRows(rows, "template")); } }
internal static string CopyFolders(int sourceSiteId, int destinationSiteId) { using (var scope = new QPConnectionScope()) { var rows = Common.CopyFolders(sourceSiteId, destinationSiteId, scope.DbConnection); return(MultistepActionHelper.GetXmlFromDataRows(rows, "folder")); } }
public static IEnumerable <DataRow> CopyContentsData(int sourceSiteId, int destinationSiteId, string contentsToCopy, int startFrom, int endBy) { var relBetweenContents = ContentRepository.GetRelationsBetweenContentsXml(sourceSiteId, destinationSiteId, string.Empty); var relBetweenStatuses = ContentRepository.GetRelationsBetweenStatuses(sourceSiteId, destinationSiteId); var items = ContentRepository.CopyContentItems(sourceSiteId, destinationSiteId, contentsToCopy, startFrom, endBy, relBetweenContents, relBetweenStatuses).ToList(); var relBetweenItems = MultistepActionHelper.GetXmlFromDataRows(items, "item"); ContentRepository.CopyContentItemSchedule(relBetweenContents); WorkflowRepository.CopyArticleWorkflowBind(sourceSiteId, destinationSiteId, relBetweenItems); ContentRepository.CopyContentItemAccess(relBetweenItems); var relBetweenAttributes = FieldRepository.GetRelationsBetweenAttributesXml(sourceSiteId, destinationSiteId, string.Empty, false, true); ContentRepository.UpdateContentData(relBetweenAttributes, relBetweenItems); return(items); }