Beispiel #1
0
        private void EditItem_Click(object sender, RoutedEventArgs e)
        {
            var Cakes = db.Cakes.ToList();
            var index = Cakes.IndexOf(HomeListView.SelectedItem as Cake);

            if (index <= Cakes.Count && index != -1)
            {
                var item   = HomeListView.SelectedItem as Cake;
                var screen = new UserControlShowDetail(item, 0);
                screen.Handler += Status;
                GridMain.Children.Add(screen);
            }
        }
Beispiel #2
0
        private void HomeListView_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var Cakes = db.Cakes.ToList();
            var index = Cakes.IndexOf(HomeListView.SelectedItem as Cake);

            if (index <= Cakes.Count && index != -1)
            {
                var item   = HomeListView.SelectedItem as Cake;
                var screen = new UserControlShowDetail(item);
                screen.Handler      += Status;
                screen.Handler_Bill += Bill_Status;
                GridMain.Children.Add(screen);
            }
        }