Ejemplo n.º 1
0
        public static void UpdateContents(int sourceSiteId, int destinationSiteId)
        {
            var relBetweenAttributes = FieldRepository.GetRelationsBetweenAttributesXml(sourceSiteId, destinationSiteId, string.Empty, false, true);

            FieldRepository.UpdateAttributes(sourceSiteId, destinationSiteId, relBetweenAttributes, string.Empty);
            FieldRepository.CopyCommandFieldBind(relBetweenAttributes);
            FieldRepository.CopyStyleFieldBind(relBetweenAttributes);
            FieldRepository.UpdateAttributesOrder(destinationSiteId, relBetweenAttributes, string.Empty);

            var relBetweenContents = ContentRepository.GetRelationsBetweenContentsXml(sourceSiteId, destinationSiteId, string.Empty);

            ContentRepository.UpdateContentsParentContentId(destinationSiteId, relBetweenContents);
            ContentRepository.CopyContentAccess(destinationSiteId, relBetweenContents);
            ContentRepository.CopyContentsCustomActions(relBetweenContents);
            ContentRepository.CopyContentFolders(relBetweenContents);
            ContentRepository.UpdateContentFolders(sourceSiteId, destinationSiteId, relBetweenContents);
        }