|
@@ -1,5 +1,4 @@
|
|
|
using System;
|
|
|
-using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
@@ -18,7 +17,9 @@ namespace Cafe.AddWindows
|
|
|
|
|
|
private void DeliteDishClick(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
- DishesList.Items.Remove((Dishes)DishesList.SelectedItem);
|
|
|
+ Dishes dish = (sender as FrameworkElement).DataContext as Dishes;
|
|
|
+
|
|
|
+ DishesList.Items.Remove(dish);
|
|
|
}
|
|
|
|
|
|
private void DishesListSelectionChanged(object sender, SelectionChangedEventArgs e)
|