Ejemplo n.º 1
0
 private void buttonAddCompany_Click(object sender, EventArgs e)
 {
     try
     {
         connectionDB.addCompanyToList(comboBoxCompany.Text, comboBoxEmail.Text, comboBoxList.Text); // Use method to add a company in the list
         comboBox1_SelectedIndexChanged(null, null);
     }
     catch (Exception er)
     {
         MessageBox.Show("Error, the list is not updated", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         MessageBox.Show(er.ToString());
     }
 }