private void buttonNewAddress_Click(object sender, EventArgs e) { FormAddAddress formAddAddress = new FormAddAddress(); formAddAddress.ShowDialog(); BindingList<Address> addresses = new BindingList<Address>(_repo.GetAddresses()); comboBoxAddresses.DataSource = addresses; comboBoxAddresses.SelectedIndex = addresses.Count - 1; }
private void buttonAddAddress_Click(object sender, EventArgs e) { FormAddAddress formAddAddress = new FormAddAddress(); formAddAddress.ShowDialog(); bindAddresses(); }