private void btnEdit_Click(object sender, EventArgs e) { Country country = (Country)bindSrcTowns.List[bindSrcTowns.Position]; CountryForm ft = new CountryForm(country); if (ft.ShowDialog() == DialogResult.OK) { bindSrcTowns.List[bindSrcTowns.Position] = country; } }
private void btnAdd_Click(object sender, EventArgs e) { Country country = new Country(); CountryForm ft = new CountryForm(country); if (ft.ShowDialog() == DialogResult.OK) { bindSrcTowns.Add(country); } }