Пример #1
0
 private void StartExecute()
 {
     try
     {
         MakeOrder create = new MakeOrder();
         main.Close();
         create.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
 private void OrderPizzaExecute()
 {
     try
     {
         if (pizza != null)
         {
             MakeOrder newOrder = new MakeOrder(pizza, currentUser);
             newOrder.ShowDialog();
             if ((newOrder.DataContext as MakeOrderViewModel).isMade == true)
             {
                 btnToOrder       = Visibility.Collapsed;
                 myOrdersList     = Service.Service.GetOrdersByUsername(currentUser.username);
                 ordersVisibility = Visibility.Visible;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }