private void delProduct_Click(object sender, RoutedEventArgs e) { DeleteProductWindow delwin = new DeleteProductWindow(); if (delwin.ShowDialog() == true) { } }
public Product OpenDelProductWindow() { DeleteProductWindow win = new DeleteProductWindow(); if (win.ShowDialog() == true) { Product p = win.listProduct.SelectedItem as Product; return(p); } return(null); }
/// <summary> /// Creates dialog window with product deleting interface /// </summary> private void Delete_Click(object sender, RoutedEventArgs e) { DeleteProductWindow deleteProductWindow = new DeleteProductWindow(); deleteProductWindow.ShowDialog(); }