コード例 #1
0
        public override IReportTreeNode BuildReportTree(ReportType reportType, int businessUnitId)
        {
            Serialization.ReportGroupingMetadata metadata = (Serialization.ReportGroupingMetadata)Serialization.ReportDefinitionLibraryMetadataCache.GetReportDefinitionLibraryMetadata(path, typeof(Serialization.ReportGroupingMetadata));

            Serialization.ReportGroupingType reportGroupingType;

            if (reportType == ReportType.Dealer)
            {
                reportGroupingType = Serialization.ReportGroupingType.Dealer;
            }
            else
            {
                reportGroupingType = Serialization.ReportGroupingType.DealerGroup;
            }

            IReportTreeNode root = null;

            foreach (Serialization.ReportGrouping reportGrouping in metadata.ReportGroupings)
            {
                if (!reportGrouping.ReportGroupingType.Equals(reportGroupingType))
                {
                    continue;
                }

                root = Copy(reportGrouping.Node, businessUnitId);

                break;
            }

            return(root);
        }
コード例 #2
0
        public override IReportTreeNode BuildReportTree(string id, int businessUnitId)
        {
            Serialization.ReportGroupingMetadata metadata = (Serialization.ReportGroupingMetadata)Serialization.ReportDefinitionLibraryMetadataCache.GetReportDefinitionLibraryMetadata(path, typeof(Serialization.ReportGroupingMetadata));

            IReportTreeNode root = null;

            foreach (Serialization.ReportGrouping reportGrouping in metadata.ReportGroupings)
            {
                Serialization.Node node = FindNode(reportGrouping.Node, id);

                if (node != null)
                {
                    root = Copy(node, businessUnitId);
                    break;
                }
            }

            return(root);
        }