private void button_Click(object sender, RoutedEventArgs e) { //module.com1.Close(); //System.Windows.MessageBox.Show(MainWindow.fileName.Substring(0,MainWindow.fileName.LastIndexOf("."))); Window2 win2 = new Window2(); win2.ShowDialog(); }
private void addContainerButton_Click(object sender, RoutedEventArgs e) { var dialog = new Window2(); if (dialog.ShowDialog() == true) { _context.Database.ExecuteSqlCommand("INSERT INTO dbo.Containers (ContainerName) VALUES ('" + dialog.ResponseText + "');"); RefreshComboBox(); ContainerDropdown.SelectedIndex = ContainerDropdown.Items.Count - 1; } }