Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
        public void Apply(SectionFilterCollection secFilterCollection)
        {
            this.Clear();

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

                secFilter.Apply(filter);

                this.Add(secFilter);
            }
        }
Ejemplo n.º 4
0
        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);
        }