new System.Threading.Thread(new System.Threading.ThreadStart(() =>
{
//new 线程获取大量数据
DataTable dtt = null;
try
{//new 线程获取大量数据
string TTL_rs = inout.getInOutInfo_TTL_Json(" and 1=1 ");
dtt = JsonUtil.JsonToDataTable(TTL_rs);
}
catch
{ }
BeginInvoke(new System.Threading.ThreadStart(() =>
{
if (dtt == null)
return;
//如果此行在Invoke就会阻塞主线程,放在外面来执行就无忧了
showData(dtt);
}));
}))
{ IsBackground = true }.Start();