Пример #1
0
        public void Apply(SectionFilterCollection secFilterCollection)
        {
            this.Clear();

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

                secFilter.Apply(filter);

                this.Add(secFilter);
            }
        }
Пример #2
0
        // 08-22-2011 Scott
        public SectionFilterCollection GetEffFilters(ScFilterList scFilterList)
        {
            SectionFilterCollection sectionFilters = new SectionFilterCollection();

            sectionFilters.Add(new SectionFilter("Offense Eff", this.GetOffenseEffFilter(scFilterList)));
            sectionFilters.Add(new SectionFilter("Offense Run Eff", this.GetRunOffenseEffFilter(scFilterList)));
            sectionFilters.Add(new SectionFilter("Offense Pass Eff", this.GetPassOffenseEffFilter(scFilterList)));
            sectionFilters.Add(new SectionFilter("Defense Eff", this.GetDefenseEffFilter(scFilterList)));
            sectionFilters.Add(new SectionFilter("Defense Run Eff", this.GetRunDefenseEffFilter(scFilterList)));
            sectionFilters.Add(new SectionFilter("Defense Pass Eff", this.GetPassDefenseEffFilter(scFilterList)));

            return(sectionFilters);
        }
Пример #3
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);
        }
Пример #4
0
        public bool UpdateSectionFilters()
        {
            AdvFilterConvertor convertor = new AdvFilterConvertor();

            //Modified at 2009-1-19 14:09:52@Scott
            if (this.ReportScType == ReportScType.Custom)
            {
                this._SectionFilters = AdvFilterConvertor.GetCustomFilters(DataProvider.VideoPlayBackManager.AdvReportFilters, this._SectionFilters);
            }
            else
            {
                this.SectionFilters = convertor.GetReportFilters(Webb.Reports.DataProvider.VideoPlayBackManager.AdvReportFilters, this.ReportScType);                   //add 1-19-2008 scott
            }
            return(true);
        }
Пример #5
0
        public SectionFilterCollection GetAllCustomReportFilters(ScFilterList scFilterList)
        {
            SectionFilterCollection sectionFilters = new SectionFilterCollection();

            foreach (ScAFilter scFilter in scFilterList.ScFilters)
            {
                if (scFilter.ReportScType > 0 && scFilter.ReportScType < 5)
                {
                    continue;
                }

                sectionFilters.Add(this.GetReportFilter(scFilter));
            }

            return(sectionFilters);
        }
Пример #6
0
        public SectionFilterCollection GetReportFilters(ScFilterList scFilterList)
        {
            SectionFilterCollection sectionFilters = new SectionFilterCollection();

            foreach (ScAFilter scFilter in scFilterList.ScFilters)
            {
                sectionFilters.Add(this.GetReportFilter(scFilter));
            }

            #region Run/Pass Off/Def filters
            //DBFilter filter = this.GetRunOffenseEffFilter(scFilterList);

            //SectionFilter scFilter = new SectionFilter(filter);

            //scFilter.FilterName = filter.Name;

            //sectionFilters.Add(scFilter);

            //filter = this.GetPassOffenseEffFilter(scFilterList);

            //scFilter = new SectionFilter(filter);

            //scFilter.FilterName = filter.Name;

            //sectionFilters.Add(scFilter);

            //filter = this.GetRunDefenseEffFilter(scFilterList);

            //scFilter = new SectionFilter(filter);

            //scFilter.FilterName = filter.Name;

            //sectionFilters.Add(scFilter);

            //filter = this.GetPassDefenseEffFilter(scFilterList);

            //scFilter = new SectionFilter(filter);

            //scFilter.FilterName = filter.Name;

            //sectionFilters.Add(scFilter);
            #endregion

            return(sectionFilters);
        }
Пример #7
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);
        }
Пример #8
0
        public SectionFilterCollection GetReportFilters(ScFilterList scFilterList, ReportScType reportScType)
        {
            SectionFilterCollection sectionFilters = new SectionFilterCollection();

            foreach (ScAFilter scFilter in scFilterList.ScFilters)
            {
                if (Enum.GetName(typeof(ReportScType), scFilter.ReportScType) == reportScType.ToString())
                {
                    if ((!scFilter.Name.EndsWith("-O") && !scFilter.Name.EndsWith("-D")) && scFilter.ReportScType != 10 && scFilter.ReportScType != 11)   //crazy   //scFilter.ReportScType!=9
                    {
                        continue;
                    }

                    sectionFilters.Add(this.GetReportFilter(scFilter));
                }
            }

            return(sectionFilters);
        }
Пример #9
0
 public SectionFilterCollectionWrapper(SectionFilterCollection scfilters, ReportScType scType)
 {
     this.SectionFilters = scfilters;
     this.ReportScType   = scType;
 }
Пример #10
0
        public void Apply(WebbReportTemplate template)
        {
            this._SectionFilters = template.SectionFilters.Copy();

            this._GroupByField = template.GroupByField;

            this._ReportScType = template.ReportScType;

            this._TopCount = template.TopCount;

            this._OnePageReport = template._OnePageReport;

            this._RepeatedReport = template.RepeatedReport;

            this._RepeatedWidth = template.RepeatedWidth;

            this._RepeatedHeight = template.RepeatedHeight;

            this._RepeatedCount = template._RepeatedCount;

            this._RepeatedVerticalCount = template.RepeatedVerticalCount;

            this.Filter = template.Filter.Copy();

            this._DiagramScoutType = template.DiagramScoutType;

            this.GroupByFields.Clear();
            foreach (object o in template.GroupByFields)
            {
                this.GroupByFields.Add(o);
            }

            this._GroupBySectionFilters = template.GroupBySectionFilters.Copy();

            this.RepeatFields.Clear();

            foreach (object o in template.RepeatFields)
            {
                this.RepeatFields.Add(o);
            }

            this.RepeatSectionFilters = template.RepeatSectionFilters.Copy();

            this._RepeatTopCount = template.RepeatTopCount;

            this.SectionFiltersWrapper = template.SectionFiltersWrapper;               //Modified at 2009-1-15 9:12:52@Scott

            this.GroupBySectionFiltersWrapper = template.GroupBySectionFiltersWrapper; //Modified at 2009-1-15 9:12:55@Scott

            this.RepeatSectionFiltersWrapper = template.RepeatSectionFiltersWrapper;   //Modified at 2009-1-15 9:12:58@Scott

            this.Consecutive = template.Consecutive;                                   //Modified at 2009-2-2 14:00:01@Scott

            this.AutoLayOut = template.AutoLayOut;                                     //Add at 2009-2-25 14:05:11@Simon

            this._FieldsGroupStyle = template._FieldsGroupStyle;                       //2009-3-4 14:37:40@Simon

            this._OneValueGroupInfo = template._OneValueGroupInfo;                     //2009-3-5 15:14:09@Simon

            this.LicenseLevel = template.LicenseLevel.Copy();                          //2009-6-15 10:57:48@Simon Add this Code

            if (ReportWizardSetting != null)
            {
                this._ReportWizardSetting = template.ReportWizardSetting.Copy();
            }
        }