private void ButtonEdit_Click(object sender, RoutedEventArgs e)
        {
            if (lstBoxCurrDonations.SelectedIndex == -1)
            {
                MessageBox.Show("Please select an order");
            }
            else
            {
                String c1 = lstBoxCurrDonations.SelectedItem as String;

                foreach (Pedido p in restaurante.pedidosRestaurante)
                {
                    if (c1.Equals(p.withCodeString()))
                    {
                        DonateFood donateFood = new DonateFood(restaurante, p);
                        this.NavigationService.Navigate(donateFood);
                        break;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DonateFood donateFood = new DonateFood(restaurante, pedido);

            this.NavigationService.Navigate(donateFood);
        }