private void button1_Click(object sender, EventArgs e) { if (wcombo.Text == "" || dobcombo.Text == "") { MessageBox.Show("Empty field", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { try { DialogResult d; d = MessageBox.Show("Record deleted successfully\nwould you like to delete one more record?", "Success", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (d == DialogResult.Yes) { Close(); Form obj1 = new delWriter(); obj1.Show(); } else { Close(); Form obj1 = new deletemain(); obj1.Show(); } } catch { } } }
private void button1_Click(object sender, EventArgs e) { Form obj; if (radioButton1.Checked) { this.Hide(); obj = new delseries(); obj.Show(); } else if (radioButton2.Checked) { this.Hide(); obj = new delMovie(); obj.Show(); } else if (radioButton3.Checked) { this.Hide(); obj = new delWriter(); obj.Show(); } else if (radioButton4.Checked) { this.Hide(); obj = new delActor(); obj.Show(); } else if (radioButton5.Checked) { this.Hide(); obj = new delepisode(); obj.Show(); } else { MessageBox.Show("No option selected", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }