コード例 #1
0
        // 08-22-2011 Scott
        public bool UpdateEffFilter()
        {
            this.C_LBAdvFilters.Items.Clear();

            this.txtValue.Text = string.Empty;

            ScFilterList scFilterList = Webb.Reports.DataProvider.VideoPlayBackManager.AdvReportFilters;

            AdvFilterConvertor convert = new AdvFilterConvertor();

            sectionFilters = convert.GetEffFilters(scFilterList);

            if (sectionFilters.Count > 0)
            {
                foreach (SectionFilter filter in sectionFilters)
                {
                    this.C_LBAdvFilters.Items.Add(filter);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
        public new bool Update()
        {
            this.C_LBAdvFilters.Items.Clear();

            this.txtValue.Text = string.Empty;

            ScFilterList scFilterList = Webb.Reports.DataProvider.VideoPlayBackManager.AdvReportFilters;

//			if(scFilterList==null)
//			{
//				object objUserFolder = RegKey.GetValue(KeyName);
//
//				if(objUserFolder == null) return false;
//
//				string strUserFolder = objUserFolder.ToString();
//
//				if(strUserFolder.EndsWith("\\")) strUserFolder = strUserFolder.Remove(strUserFolder.Length - 1,1);
//
//				int index = strUserFolder.LastIndexOf('\\');
//
//				strUserFolder = strUserFolder.Remove(index + 1,strUserFolder.Length - index - 1);
//
//				strUserFolder += @"WebbRpt\ScFilter.dat";
//
//				if(!scFilterList.ReadOldFiltersFromDisk(strUserFolder))return false;
//			}

            AdvFilterConvertor convert = new AdvFilterConvertor();

            sectionFilters = convert.GetReportFilters(scFilterList);

            if (sectionFilters.Count > 0)
            {
                foreach (SectionFilter filter in sectionFilters)
                {
                    this.C_LBAdvFilters.Items.Add(filter);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
        //Fill Left List
        private void LoadSectionFilters()
        {
            this.C_ListSecFilters.Items.Clear();

            this.C_ListSelectedSecFilters.Items.Clear();

            ScFilterList scFilterList = new ScFilterList();

            object objUserFolder = RegKey.GetValue(KeyName);

            if (objUserFolder == null)
            {
                return;
            }

            string strUserFolder = objUserFolder.ToString();

            if (strUserFolder.EndsWith("\\"))
            {
                strUserFolder = strUserFolder.Remove(strUserFolder.Length - 1, 1);
            }

            int index = strUserFolder.LastIndexOf('\\');

            strUserFolder = strUserFolder.Remove(index + 1, strUserFolder.Length - index - 1);

            strUserFolder += @"WebbRpt\ScFilter.dat";

            ArrayList arrList = new ArrayList();

            if (this._InitSectionFilters != null)
            {
                foreach (SectionFilter scFilter in this._InitSectionFilters)
                {
                    this.C_ListSelectedSecFilters.Items.Add(scFilter);

                    arrList.Add(scFilter.FilterName);
                }
            }


            if (scFilterList.ReadOldFiltersFromDisk(strUserFolder))
            {
                AdvFilterConvertor convertor = new AdvFilterConvertor();

                SectionFilterCollection sectionFilters = convertor.GetReportFilters(scFilterList);

                foreach (SectionFilter filter in sectionFilters)
                {
                    if (!arrList.Contains(filter.FilterName))
                    {
                        this.C_ListSecFilters.Items.Add(filter);
                    }
                }
            }

            if (this.C_ListSecFilters.Items.Count > 0)
            {
                this.C_ListSecFilters.SelectedIndex = 0;
            }
        }