Exemple #1
0
        private void FormDeviceShow_Load(object sender, EventArgs e)
        {
            int CangKuID = Convert.ToInt32(dgvr.Cells[1].Value);

            //启线程
            Thread thread = new Thread(() =>
            {
                DealDataGridViewQueryBLL bll = new DealDataGridViewQueryBLL();
                DataTable dt = bll.GetIOTDeviceDataTable(CangKuID); //获取数据源---耗时操作,单启线程
                BindDataGridData(dt);
            });                                                     //新建线程

            thread.IsBackground = true;
            thread.Start();
        }