private void Button_Click(object sender, RoutedEventArgs e) { if (tabels.SelectedItem == null) { MessageBox.Show("Выберете стол."); } else { UpdatingTables ut = new UpdatingTables(int.Parse((tabels.SelectedItem).ToString())); ut.Show(); this.Close(); } }