/// <summary> /// Obsługa naciśnięcia btn OK. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">EventArgs.</param> private void okRadButtonElement_Click(object sender, EventArgs e) { CityService cityService = new CityService(); if (CurrentCity != null) { this.CurrentCity.Name = this.nameTextBox.Text; cityService.ChangeCitiesCountry(this.CurrentCity, this.countryComboBox.Text, this.CountryCollection); AcceptAndClose(); } else { cityService.AddNewCity(this.nameTextBox.Text, this.countryComboBox.Text, this.CountryCollection); } }