private void buttonDelete_Click(object sender, EventArgs e) { { connectionDB.ConnectionMySql(); try { if (comboBoxCompany.Text != null && comboBoxEmail.Text != null) { connectionDB.deleteCompany(comboBoxCompany.Text, comboBoxEmail.Text); } MessageBox.Show("Company deleted"); CompanyListForm_Load(null, null); comboBoxCompany.Text = null; comboBoxEmail.Text = null; } catch { MessageBox.Show("Error : Can't delete from Database"); } } }