private void buttonHapus_Click(object sender, EventArgs e) { string h = ""; if (checkBox1.Checked == true) { h = BOM.HapusData(comboBox1.Text, ""); } else { h = BOM.HapusData(comboBox1.Text, comboBox2.Text); } if (h == "1") { MessageBox.Show("BOM telah dihapus"); FormDaftarBOM f = (FormDaftarBOM)this.Owner; f.FormDaftarBOM_Load(sender, e); textBoxbahan.Text = ""; textBoxNamaJabatan.Text = ""; comboBox1.Text = ""; comboBox2.Text = ""; FormHapusBOM_Load(sender, e); } else { MessageBox.Show("BOM gagal dihapus. Pesan: " + h); } }