public void fillComboboxLocationNameWithSalaryNull(ComboBox comboBox) { comboBox.Items.Clear(); locationDB = new LocationDB(); connection = new DBConnection(); SqlDataReader reader = locationDB.fillComboboxLocationNameWithoutSalaryNull(); while (reader.Read()) { comboBox.Items.Add(reader["name"]); } connection.close(); }