Example #1
0
        private async void UxClosePopupButton(object sender, RoutedEventArgs e)
        {
            uxIngredientPopup.IsOpen = false;
            await UpdateIngredientRequest.SendUpdateIngredientRequest(selectedIngredient._id, "quantity", selectedIngredient.quantity.ToString());

            await RefreshIngredientList();
        }
Example #2
0
        public async Task DecrementIngredients()
        {
            //get all of the ingredients for the current order
            await GetIngredientsRequest.SendGetIngredientsListRequest();

            foreach (MenuItems m in c_ordersMaster.menuItems)
            {
                foreach (string i in m.ingredients)
                {
                    string check         = i;
                    int    newQuantity   = RealmManager.Find <Ingredients>(i).quantity - 1;
                    var    validResponse = await UpdateIngredientRequest.SendUpdateIngredientRequest(i, "quantity", newQuantity.ToString());
                }
            }
        }