private void btnDelete_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show("Are you sure you want to delete this flight?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)) { if (mysqlConn.connOpen() == true) { mysqlConn.deleteFlight(tbFlightID.Text); dataGridView1.DataSource = mysqlConn.qry("SELECT * FROM `tblFlight`").Tables[0]; } } }
private void btnDelete_Click(object sender, EventArgs e) { mysqlConn.deleteFlight(tbFlightID.Text); }