private void btnCreate_Click(object sender, RoutedEventArgs e) { if (this.ConfigurationWindowSettings.moduleDescription.Attributes.RequiresConnection && ddSelectConnection.SelectedItem == null) { MessageBox.Show("Please select a connection before saving!", "Information"); return; } bool validationSuccessful = ConfigurationValidationHelper.ValidateCurrentConfiguration(ConfigurationWindowSettings.configuration); if (validationSuccessful) { this.Status = WindowResult.Updated; this.Close(); } }
private void btnCreate_Click(object sender, RoutedEventArgs e) { bool validationSuccessful = ConfigurationValidationHelper.ValidateCurrentConfiguration(this.ConnectionConfiguration); if (validationSuccessful) { if (String.IsNullOrEmpty(tbConnectionName.Text)) { MessageBox.Show("Connection-Name must not be empty!"); } else { this.Status = newConfiguration ? WindowResult.Created : WindowResult.Updated; this.Close(); } } }