コード例 #1
0
ファイル: AdvFilter.cs プロジェクト: WittyOrator/ReportSystem
        public static SectionFilterCollection GetCustomFilters(ScFilterList scFilterList, SectionFilterCollection scFilters)
        {
            //2009-5-1 13:33:26@Simon Add this Code

            if (scFilters == null)
            {
                return(scFilters);
            }

            if (scFilterList == null || scFilterList.ScFilters.Count == 0)
            {
                return(scFilters);
            }

            AdvFilterConvertor convert = new AdvFilterConvertor();

            SectionFilterCollection newscfFilters = new SectionFilterCollection();

            foreach (SectionFilter scFilter in scFilters)
            {
                if (scFilter == null)
                {
                    return(scFilters);
                }

                ScAFilter scAfilter = scFilterList.GetFilter(scFilter.FilterName);

                SectionFilter secFilter = new SectionFilter();

                if (scAfilter != null && scFilter.Filter.Name != string.Empty)
                {
                    if (!scFilter.Filter.IsCustomFilter)
                    {
                        secFilter = convert.GetReportFilter(scAfilter);
                    }
                    else
                    {
                        secFilter.Apply(scFilter);
                    }
                }
                else
                {
                    secFilter.Apply(scFilter);
                }

                newscfFilters.Add(secFilter);
            }

            return(newscfFilters);
        }
コード例 #2
0
ファイル: Class.cs プロジェクト: WittyOrator/ReportSystem
        private void UpdateSectionInfo(PageGroupInfo groupInfo)
        {
            PageSectionInfo newpageSections = groupInfo as PageSectionInfo;

            if (newpageSections != null)
            {
                SectionFilterCollectionWrapper scFilterWrapper = new SectionFilterCollectionWrapper();

                scFilterWrapper.ReportScType = newpageSections.SectionFilterWrapper.ReportScType;

                foreach (SectionFilter scFilter in   newpageSections.SectionFilterWrapper.SectionFilters)
                {
                    if (scFilter == null)
                    {
                        scFilterWrapper.SectionFilters.Add(scFilter);
                    }
                    else
                    {
                        SectionFilter newScFilter = new SectionFilter();

                        newScFilter.Apply(scFilter);

                        scFilterWrapper.SectionFilters.Add(newScFilter);
                    }
                }

                (groupInfo as PageSectionInfo).SectionFilterWrapper = scFilterWrapper;
            }
        }
コード例 #3
0
ファイル: Class.cs プロジェクト: WittyOrator/ReportSystem
        public void Apply(SectionFilterCollection secFilterCollection)
        {
            this.Clear();

            foreach (SectionFilter filter in secFilterCollection)
            {
                SectionFilter secFilter = new SectionFilter();

                secFilter.Apply(filter);

                this.Add(secFilter);
            }
        }
コード例 #4
0
ファイル: Class.cs プロジェクト: WittyOrator/ReportSystem
        public SectionFilterCollection Copy()
        {
            SectionFilterCollection secFilterCollection = new SectionFilterCollection();

            foreach (SectionFilter filter in this)
            {
                if (filter != null)
                {
                    SectionFilter secFilter = new SectionFilter();

                    secFilter.Apply(filter);

                    secFilterCollection.Add(secFilter);
                }
            }

            return(secFilterCollection);
        }