Пример #1
0
        private void ButtonOrder_Click(object sender, RoutedEventArgs e)
        {
            if (recipesInBucket.Count == 0)
            {
                MessageBox.Show("Votre commande ne contient aucune recette");
                return;
            }
            if (AuthUser.Client.Cooks < order.TotalCost)
            {
                MessageBox.Show("Solde Cook insuffisant");
                ButtonGiveCooks.Visibility = Visibility.Visible;
                return;
            }

            ServiceOrder serviceOrder = new ServiceOrder();

            serviceOrder.Save(order);

            MessageBox.Show("Votre commande a bien été enregistrée vous serez livrés dans 35 min");

            //Reload la page après une commande
            FragmentMarket fragmentMarket = new FragmentMarket();

            NavigationService.Navigate(fragmentMarket);
        }
        private void ButtonOrderNow_Click(object sender, RoutedEventArgs e)
        {
            FragmentMarket fragmentMarket = new FragmentMarket();

            PageHome.SetButtonActive(PageHome.GlobalButtonMarket);

            NavigationService.Navigate(fragmentMarket);
        }