KBS2.Controls.EditLocationDialog.AcceptButton_Click C# (CSharp) Method

AcceptButton_Click() private method

private AcceptButton_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void AcceptButton_Click(object sender, EventArgs e)
        {
            string inputLocationName = newLocationNameTextbox.Text;
            string inputCityName = newCityNameTextBox.Text;
            if (!string.IsNullOrWhiteSpace(inputLocationName) && !string.IsNullOrWhiteSpace(inputCityName)) {
                _targetLocation.SetLocationAndCityName(inputLocationName, inputCityName);
                if (this._updateParentCallback != null) {
                    this._updateParentCallback();
                }
                MessageBox.Show("Locatie succesvol gewijzigd!");
                if (AbstractDialog.Current != null) {
                    AbstractDialog.Current.Hide();
                }
            }
            else {
                MessageBoxUtil.ShowError("Foutmelding", "U dient een nieuwe naam voor de locatienaam en/of de plaatsnaam in te vullen in te vullen.");
            }
        }