private void btnDiscontinue_Click(object sender, EventArgs e) { if (txtDVDId.Text.Equals("")) { MessageBox.Show("Field Must Not Be Empty", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); txtDVDId.Focus(); return; } DVD dvd = new DVD(); dvd.setDVDId(Convert.ToInt32(grdDVD.Rows[grdDVD.CurrentCell.RowIndex].Cells[0].Value)); dvd.setStatus(cbotxtStatus.Text); dvd.DiscontinueDVD(); if (cbotxtStatus.Text == "A") { dvd.setStatus("A"); } else { dvd.setStatus("NA"); } //Display Confirmation Message MessageBox.Show(grdDVD.Rows[grdDVD.CurrentCell.RowIndex].Cells[1].Value + " status has been changed", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information); txtDVDId.Text = ""; cbotxtStatus.Text = ""; DataSet ds = new DataSet(); grdDVD.DataSource = DVD.getDVD(ds).Tables["ss"]; }