标签:datagridview blog io os ar for 数据 div on
private void button1_Click(object sender, EventArgs e) { string sqlcmd = ""; for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Cells[0].Value != null) { sqlcmd += "delete from T_danhao where id = " + dataSet1.Tables[0].Rows[i][0].ToString() + ";"; //MessageBox.Show(sqlcmd); } } if (sqlcmd != "") { try { Cmd = new MySqlCommand(sqlcmd, Conn); Cmd.ExecuteNonQuery(); Fresh_table(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } } }
标签:datagridview blog io os ar for 数据 div on
原文地址:http://www.cnblogs.com/lijurui/p/3996967.html