Esempio n. 1
0
        /// <summary>
        /// 异步加载检测项
        /// </summary>
        public void DataBind()
        {
            DetectItems      itemsBll   = new DetectItems();
            BackgroundWorker backWorker = new BackgroundWorker();

            backWorker.DoWork += (ss, ee) =>
            {
                mDetectItems = itemsBll.GetSelectItemsList();
            };
            backWorker.RunWorkerCompleted += (ss, ee) =>
            {
                ICollectionView mViewCollection = CollectionViewSource.GetDefaultView(mDetectItems);
                mViewCollection.GroupDescriptions.Add(new PropertyGroupDescription("DetectVariety.typeName"));
                lsvDetectItem.ItemsSource = mViewCollection;
            };
            backWorker.RunWorkerAsync();
        }
Esempio n. 2
0
        /// <summary>
        /// 获取检测项信息
        /// </summary>
        public void GetItemData()
        {
            DetectItems itemsBll = new DetectItems();

            mDetectItems = itemsBll.GetSelectItemsList();
        }