private void NewProduct_Click(object sender, RoutedEventArgs e) { EditProductWindow _new = new EditProductWindow(null); _new.ShowDialog(); updateProducts(); }
private void Products_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Product selected = (Product)Products.SelectedItem; EditProductWindow _new = new EditProductWindow(selected); _new.ShowDialog(); updateProducts(); }