コード例 #1
0
        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();
            }
        }
コード例 #2
0
ファイル: Class.cs プロジェクト: WittyOrator/ReportSystem
        public WebbReportTemplate(SerializationInfo info, StreamingContext context)
        {
            try
            {
                this._GroupByField = info.GetString("GroupByField");
            }
            catch
            {
            }

            try
            {
                this._SectionFilters = info.GetValue("SectionFilters", typeof(SectionFilterCollection)) as SectionFilterCollection;
            }
            catch
            {
                this._SectionFilters = new SectionFilterCollection();
            }

            try
            {
                this._ReportScType = (ReportScType)info.GetValue("ReportScType", typeof(ReportScType));
            }
            catch
            {
                this._ReportScType = ReportScType.Custom;
            }

            try
            {
                this._OneValuePerPage = info.GetBoolean("OneValuePerPage");
            }
            catch
            {
                this._OneValuePerPage = false;
            }

            try
            {
                this._TopCount = info.GetInt32("TopCount");
            }
            catch
            {
                this._TopCount = 0;
            }

            try
            {
                this._OnePageReport = info.GetBoolean("OnePageReport");
            }
            catch
            {
                this._OnePageReport = false;
            }

            try
            {
                this._RepeatedReport = info.GetBoolean("RepeatedReport");
            }
            catch
            {
                this._RepeatedReport = false;
            }

            try
            {
                this._RepeatedWidth = info.GetSingle("RepeatedWidth");
            }
            catch
            {
                this._RepeatedWidth = 240f;
            }

            try
            {
                this._RepeatedHeight = info.GetSingle("RepeatedHeight");
            }
            catch
            {
                this._RepeatedHeight = 240f;
            }

            try
            {
                this._RepeatedCount = info.GetInt32("RepeatedCount");
            }
            catch
            {
                this._RepeatedCount = 3;
            }

            try
            {
                this._RepeatedVerticalCount = info.GetInt32("RepeatedVerticalCount");
            }
            catch
            {
                this._RepeatedVerticalCount = 3;
            }

            try
            {
                this._Filter = info.GetValue("Filter", typeof(DBFilter)) as DBFilter;

                this._Filter = AdvFilterConvertor.GetAdvFilter(DataProvider.VideoPlayBackManager.AdvReportFilters, this._Filter);    //2009-4-29 11:37:37@Simon Add UpdateAdvFilter
            }
            catch
            {
                this._Filter = new DBFilter();
            }

            try
            {
                this._DiagramScoutType = (DiagramScoutType)info.GetValue("DiagramScoutType", typeof(DiagramScoutType));
            }
            catch
            {
                this._DiagramScoutType = DiagramScoutType.Offense;
            }

            try
            {
                this._GroupByFields = info.GetValue("_GroupByFields", typeof(IList)) as IList;
            }
            catch
            {
                this._GroupByFields = new StringCollection();
            }

            try
            {
                this._GroupBySectionFilters = info.GetValue("_GroupBySectionFilters", typeof(SectionFilterCollection)) as SectionFilterCollection;
            }
            catch
            {
                this._GroupBySectionFilters = new SectionFilterCollection();
            }

            //Added this code at 2008-12-25 14:55:42@Simon
            try
            {
                this._RepeatFields = info.GetValue("_RepeatFields", typeof(IList)) as IList;
            }
            catch
            {
                this._RepeatFields = new StringCollection();
            }

            try
            {
                this._RepeatSectionFilters = info.GetValue("_GroupBySectionFilters", typeof(SectionFilterCollection)) as SectionFilterCollection;
            }
            catch
            {
                this._RepeatSectionFilters = new SectionFilterCollection();
            }

            try
            {
                this._RepeatTopCount = info.GetInt32("_RepeatTopCount");
            }
            catch
            {
                this._RepeatTopCount = 0;
            }

            #region Modify codes at 2009-1-12 10:01:51@Simon
            try
            {
                this.ClickEvent = info.GetBoolean("ClickEvent");
            }
            catch
            {
                this.ClickEvent = Webb.Reports.DataProvider.VideoPlayBackManager.ClickEvent;
            }
            #endregion                    //End Modify

            //Modified at 2009-1-14 17:27:16@Scott
            try
            {
                this.SectionFiltersWrapper = info.GetValue("SectionFiltersWrapper", typeof(SectionFilterCollectionWrapper)) as SectionFilterCollectionWrapper;
            }
            catch
            {
                //this.SectionFiltersWrapper = new SectionFilterCollectionWrapper();
            }

            //Modified at 2009-1-14 17:27:16@Scott
            try
            {
                this.GroupBySectionFiltersWrapper = info.GetValue("GroupBySectionFiltersWrapper", typeof(SectionFilterCollectionWrapper)) as SectionFilterCollectionWrapper;
            }
            catch
            {
                //this.GroupBySectionFiltersWrapper = new SectionFilterCollectionWrapper(this.GroupBySectionFilters,ReportScType.Custom);
            }

            //Modified at 2009-1-14 17:27:16@Scott
            try
            {
                this.RepeatSectionFiltersWrapper = info.GetValue("RepeatSectionFiltersWrapper", typeof(SectionFilterCollectionWrapper)) as SectionFilterCollectionWrapper;
            }
            catch
            {
                //this.RepeatSectionFiltersWrapper = new SectionFilterCollectionWrapper(this.RepeatSectionFilters,ReportScType.Custom);
            }

            try                 //Modified at 2009-2-2 14:01:36@Scott
            {
                this.Consecutive = info.GetBoolean("Consecutive");
            }
            catch
            {
                this.Consecutive = false;
            }
            try
            {
                this._FieldsGroupStyle = (FieldsGroupStyle)info.GetValue("_FieldsGroupStyle", typeof(FieldsGroupStyle));
            }
            catch
            {
                _FieldsGroupStyle = FieldsGroupStyle.TreeView;;
            }
            try
            {
                this.AutoLayOut = info.GetBoolean("AutoLayOut");
            }
            catch
            {
                this.AutoLayOut = false;
            }
            try
            {
                this._OneValueGroupInfo = info.GetValue("_OneValueGroupInfo", typeof(PageGroupInfo)) as PageGroupInfo;

                if (_OneValueGroupInfo is PageSectionInfo)                 //2009-3-11 9:46:52@Simon
                {
                    _OneValueGroupInfo.SortingByType = SortByTypes.None;
                }
            }
            catch
            {
                this.CreatePageGroupInfo();
            }
            try
            {
                this._RepeatGroupInfo = info.GetValue("_RepeatGroupInfo", typeof(PageGroupInfo)) as PageGroupInfo;

                if (_RepeatGroupInfo is PageSectionInfo)                 //2009-3-11 9:46:55@Simon
                {
                    _RepeatGroupInfo.SortingByType = SortByTypes.None;
                }
            }
            catch
            {
                this.CreateRepeatGroupInfo();
            }
            try
            {
                this._UserLevel = info.GetValue("_UserLevel", typeof(UserLevel)) as UserLevel;
            }
            catch
            {
                _UserLevel = new UserLevel("Level5", 31);
            }
            try
            {
                this._AccessType = (ReportAccessType)info.GetValue("_AccessType", typeof(ReportAccessType));
            }
            catch
            {
                _AccessType = ReportAccessType.All;
            }
            try
            {
                this._ReportWizardSetting = (ReportWizardSetting)info.GetValue("_ReportWizardSetting", typeof(ReportWizardSetting));
            }
            catch
            {
                _ReportWizardSetting = null;
            }
        }