private void AddClassificationButton_Click(object sender, RoutedEventArgs e) { try { string conceptName; int conceptId; if (ConceptsRootComboBox.SelectedValue != null) { conceptName = ConceptsRootComboBox.SelectedValue.ToString(); conceptId = _concepts.First(c => c.Value == conceptName).Key; } else if (ConceptsRootComboBox.Text.Length != 0) { conceptName = ConceptsRootComboBox.Text; conceptId = _SQLClient.InsertConceptIdentity(conceptName); } else { throw new ArgumentException("Поле с понятием должно быть заполнено."); } _SQLClient.InsertClassification( ClassificationTypeComboBox.Text, conceptId, ClassificationBaseTextBox.Text ); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } Frames.Classifications.Instance.SelectClassifications(); Frames.Concepts.Instance.SelectClassifications(); Graphs.TreeVisualizationPage.Instance.SelectClassifications(); }