Thread t = new Thread(delegate(){
MDataTable dataTable = DBHelper.getAllServer();
foreach (MDataRow row in dataTable.Rows)
{
addDataGridViewRow(dataGridView, row);
}
});
t.Start();
private void btnAllLK3125_Click(object sender, EventArgs e)
{
btnAllLK3125.Enabled = false;
string strLog = string.Empty;
Thread t = new Thread(delegate()
{
// TODO
this.BeginInvoke((ThreadStart)delegate()
{
btnAllLK3125.Enabled = true;
});
});
t.Start();
}