Beispiel #1
0
        /// <summary>
        /// Converts all sent in foods to their ViewModelTypes
        /// </summary>
        /// <returns></returns>
        private async Task GetFoodsFromOrder()
        {
            // Getting all the foods
            FoodsToCook = await ViewModelhelpers.FillListFromDatabase <BackendHandler.Pizza, PizzaViewModel>(_orderToCook.PizzaList);

            // Setting the index
            foreach (var food in FoodsToCook)
            {
                food.ListIndex = FoodsToCook.IndexOf(food);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Load all order lists
        /// </summary>
        public async void LoadLists()
        {
            PrioritizedOrders.Clear();
            OrdersWaiting.Clear();

            // Getting all items from the database
            DatabaseList = await rep.GetOrderByStatus(0);

            // Setting it to the UI list
            OrdersReadyToCook = await ViewModelhelpers.FillListFromDatabase <BackendHandler.Order, OrderViewModel>(DatabaseList);

            FillWaitingLists();
        }