我的更新代码:
for (int i = this.MedaxilGridView1.CurrentCell.RowIndex; i < this.MedaxilGridView1.RowCount; i++)
{
// KartsifarishiGridView-dən id götürüb ona uyğun sorğumuzu yazırıq.
sqlSorgu = "UPDATE customer set medaxil_status = '0' WHERE id = " +
this.MedaxilGridView1.Rows[i].Cells["id"].Value;
//Sorğunu icra edirk.
Program.esas.sqlSorguCommand.CommandText = sqlSorgu;
Program.esas.sqlSorguCommand.Connection = Program.esas.bazayaQosul;
Program.esas.sqlSorguCommand.ExecuteNonQuery();
MedaxilGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Empty;
}
行数:18286
这个版本需要5分钟
我怎样才能让它更快?