public static ReportScType GetScType(ReportScType reportScType, AdvScoutType advscoutType)
        {
            if (reportScType == ReportScType.Custom || advscoutType == AdvScoutType.None)
            {
                return(reportScType);
            }

            ReportScType RealReportScType = reportScType;

            if (advscoutType == AdvScoutType.Offense)
            {
                if (reportScType == ReportScType.FieldZoneDefense)
                {
                    RealReportScType = ReportScType.FieldZoneOffense;
                }
                else if (reportScType == ReportScType.DownAndDistanceDefense)
                {
                    RealReportScType = ReportScType.DownAndDistanceOffense;
                }
            }
            else if (advscoutType == AdvScoutType.Defence)
            {
                if (reportScType == ReportScType.FieldZoneOffense)
                {
                    RealReportScType = ReportScType.FieldZoneDefense;
                }
                else if (reportScType == ReportScType.DownAndDistanceOffense)
                {
                    RealReportScType = ReportScType.DownAndDistanceDefense;
                }
            }

            return(RealReportScType);
        }
Exemple #2
0
        public bool LoadAdvSectionFilters(string strUserFolder, ReportScType rsctype)
        {//Modified at 2009-1-19 14:23:11@Scott
            AdvFilterConvertor convertor = new AdvFilterConvertor();

            this.SectionFilters = convertor.GetReportFilters(Webb.Reports.DataProvider.VideoPlayBackManager.AdvReportFilters, rsctype); //add 1-19-2008 scott

            this.SectionFiltersWrapper.SectionFilters = this.SectionFilters;                                                            //Modified at 2009-1-15 10:43:11@Scott

            return(true);
        }
Exemple #3
0
        private void cmbAttribute_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cmbAttribute.SelectedIndex < 0)
            {
                return;
            }

            if (this.DataProvider.DBSourceConfig.UserFolder == null)
            {
                return;
            }

            int selectIndex = this.cmbAttribute.SelectedIndex;

            //if (selectIndex == 5)
            //{
            //    rsctype = ReportScType.OffenseDefineEfficiency;
            //}
            //else if (selectIndex == 6)
            //{
            //    rsctype = ReportScType.DefenseDefineEfficiency;
            //}
            //else
            //{
            rsctype = (ReportScType)selectIndex;
            //}

            this.SectionFiltersWrapper.ReportScType = rsctype;                  //Modified at 2009-1-15 11:02:27@Scott
            if (this.cmbAttribute.SelectedIndex == 0)
            {
                this.RemoveSectionFilters();

                return;
            }

            string strUserFolder = this.DataProvider.DBSourceConfig.UserFolder.Trim(";".ToCharArray());

            int index = strUserFolder.IndexOf(";");

            if (index >= 0)
            {
                strUserFolder = strUserFolder.Substring(0, index);
            }

            this.LoadAdvSectionFilters(strUserFolder, rsctype);

            this.AddFilters(SectionFilters);
        }
        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);
        }
Exemple #5
0
        //Add summaries by section filters
        private void Menu_AddSectionSummarys_Click(object sender, System.EventArgs e)
        {
            TreeNode m_Node = this.C_GroupInfoTree.SelectedNode;

            if (m_Node == null)
            {
                return;
            }

            while (!(m_Node.Tag is GroupInfo))
            {
                m_Node = m_Node.Parent;
            }

            if (m_Node.Parent == null)
            {
                ReportScType reportScType = (m_Node.Tag as GroupInfo).ReportScType;     //Modified at 2009-1-21 14:38:11@Scott

                SectionFilterCollection secFilters = new SectionFilterCollection();

                SectionFilterCollectionWrapper wrapper = new SectionFilterCollectionWrapper(secFilters, reportScType); //Modified at 2009-1-21 14:38:06@Scott

                SectionFiltersEditorForm editForm = new SectionFiltersEditorForm(wrapper);                             //Modified at 2009-1-21 14:37:57@Scott

                if (editForm.ShowDialog() == DialogResult.OK)
                {
                    this.RemoveALlSummaryNodes(m_Node);                                                   //Modified at 2009-1-21 15:27:18@Scott

                    (m_Node.Tag as GroupInfo).ReportScType = editForm.SectionFiltersWrapper.ReportScType; //Modified at 2009-1-21 14:37:47@Scott

                    secFilters.Apply(editForm.SectionFilters);

                    foreach (SectionFilter secFilter in secFilters)
                    {
                        this.AddSummary(m_Node, secFilter);
                    }
                }
            }
        }
        private void CheckSectionFilters()
        {        //need change
            if (this.ExControl == null)
            {
                return;
            }
            if (this.ExControl.Report == null)
            {
                return;
            }
            WebbReport m_WebbReport = this.ExControl.Report as WebbReport;

            if (m_WebbReport == null)
            {
                return;
            }
            if (m_WebbReport.Template.SectionFilters.Count <= 0)
            {
                this.RemoveSectionFilters();
            }
            else
            {
                SectionFilterCollection reportSections = m_WebbReport.Template.SectionFilters;

                AdvFilterConvertor convertor = new AdvFilterConvertor();

                if (DataProvider.VideoPlayBackManager.AdvSectionType != AdvScoutType.None && m_WebbReport.Template.ReportScType != ReportScType.Custom)
                {
                    ReportScType sctype = AdvFilterConvertor.GetScType(m_WebbReport.Template.ReportScType, DataProvider.VideoPlayBackManager.AdvSectionType);   //2009-6-16 10:18:47@Simon Add this Code

                    reportSections = convertor.GetReportFilters(Webb.Reports.DataProvider.VideoPlayBackManager.AdvReportFilters, sctype);                       //add 1-19-2008 scott
                }

                this.CreateSectionGroupInfo(reportSections);
            }
        }
        public PageGroupInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            try
            {
                _PageValueCount = info.GetInt32("_PageValueCount");
            }
            catch
            {
                _PageValueCount = 1;
            }
            try
            {
                _SortingType = (Webb.Reports.SortTypes)info.GetValue("_SortingType", typeof(Webb.Reports.SortTypes));
            }
            catch
            {
            }
            try
            {
                _SortingByType = (Webb.Reports.SortByTypes)info.GetValue("_SortingByType", typeof(Webb.Reports.SortByTypes));
            }
            catch
            {
            }
            try
            {
                _GroupTitle = info.GetString("_GroupTitle");
            }
            catch
            {
                _GroupTitle = string.Empty;
            }
            try
            {
                _SkippedCount = info.GetInt32("_SkippedCount");
            }
            catch
            {
                _SkippedCount = 0;
            }
            try
            {
                _TopCount = info.GetInt32("_TopCount");
            }
            catch
            {
                _TopCount = 0;
            }
            try
            {
                _Repeat = info.GetBoolean("_Repeat");
            }
            catch
            {
                _Repeat = false;
            }
            try
            {
                _RepeatTitle = info.GetString("_RepeatTitle");
            }
            catch
            {
                _RepeatTitle = string.Empty;
            }
            try
            {
                _SubPageGroupInfos = (Webb.Reports.PageGroupCollection)info.GetValue("_SubPageGroupInfos", typeof(Webb.Reports.PageGroupCollection));
            }
            catch
            {
            }
            try
            {
                _ParentPageGroupInfo = (Webb.Reports.PageGroupInfo)info.GetValue("_ParentPageGroupInfo", typeof(Webb.Reports.PageGroupInfo));
            }
            catch
            {
            }
            try
            {
                _ReportScType = (Webb.Reports.ReportScType)info.GetValue("_ReportScType", typeof(Webb.Reports.ReportScType));
            }
            catch
            {
            }
            try
            {
                _Filter = (Webb.Data.DBFilter)info.GetValue("_Filter", typeof(Webb.Data.DBFilter));

                this._Filter = AdvFilterConvertor.GetAdvFilter(DataProvider.VideoPlayBackManager.AdvReportFilters, this._Filter);                  //2009-4-29 11:37:37@Simon Add UpdateAdvFilter
            }
            catch
            {
                _Filter = new DBFilter();
            }
        }
Exemple #8
0
 public SectionFilterCollectionWrapper(SectionFilterCollection scfilters, ReportScType scType)
 {
     this.SectionFilters = scfilters;
     this.ReportScType   = scType;
 }
Exemple #9
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();
            }
        }