zoukankan      html  css  js  c++  java
  • 线程的简单使用

    首先要说使用线程一定要只是刷新数据(例如此方法)

    //启用线程只需要刷新数据即可,使用于频繁刷新(需注意)
     public void ReshOrder()
            {
                try
                {
                    Thread thread = new Thread(
                    delegate()
                    {
                        dt_BusinessOrder = _customService.getBussinessOrders(UserInfo.uNote1, pId, cId, ccId, UserInfo.uParentId);
                    });
                    //开启线程刷新数据
                    thread.Start();

                    rescdgv(dgvBizOrders, dt_BusinessOrder);
                    dgvBizOrders.Columns[1].Visible = false;//省ID
                    dgvBizOrders.Columns[2].Visible = false;//市ID
                    dgvBizOrders.Columns[3].Visible = false;//地区ID
                    dgvBizOrders.Columns[4].Visible = false;//商户ID
                    if (dgvBizOrders.Rows.Count != 0)
                    {
                        IsPlaySound = true;
                    }
                    else
                    {
                        IsPlaySound = false;
                    }
                }
                catch { }
            }


     

  • 相关阅读:
    【转】高级爬虫
    python-基于遗传算法的多三角形拟合图像实例
    python-文件处理
    python-函数式编程与内置函数
    Python-变量、函数及递归
    Python-字符串的拼接与函数
    Python-集合
    Python-列表、元组、字典
    Python-字符串2
    Python-字符串
  • 原文地址:https://www.cnblogs.com/wsl2011/p/2029660.html
Copyright © 2011-2022 走看看