private void BtnAdd_Click(object sender, RoutedEventArgs e) { AddHotel fur = new AddHotel(null); fur.Visibility = Visibility.Visible; this.Close(); }
private void BtnChange_Click(object sender, RoutedEventArgs e) { if (DGridHotels.SelectedItem == null) { MessageBox.Show("Выберите запись"); return; } var std = DGridHotels.SelectedItem as Hotel; AddHotel fur = new AddHotel(std); fur.Visibility = Visibility.Visible; this.Close(); }