Commit 9d66c136 by Javier Piris

Cambios en custom menú viewmodel llamando a un método nuevo de…

Cambios en custom menú viewmodel llamando a un método nuevo de updatasyncingredient en local data service
parent 291e58b5
......@@ -349,7 +349,7 @@ namespace inutralia.ViewModels
foreach (Ingredient ing in ingredients.Where(i => listaCompra.Find(sl => sl.FromMenus && sl.Text.Equals(i) && sl.Id.Equals(i)) == null))
{
//await App.LocalData.UpdateItemAsync(new ShoppingList() { FromMenus = true, Select = false, Text = ing }, true);
await App.LocalData.UpdateItemAsync(new ShoppingList() { FromMenus = true, Select = false, Text = ing.Name, Id = ing.Id }, true);
await App.LocalData.UpdateItemIngredientAsync(new ShoppingList() { FromMenus = true, Select = false, Text = ing.Name, Id = ing.Id }, true);
} //endforeach
await App.LocalData.UpdateItemIngredientAsync(_LocalMenu);
......@@ -370,7 +370,7 @@ namespace inutralia.ViewModels
foreach (var ing in recipes[index].Ingredients)
{
// Lambda que elimina los ingredientes que se repiten al añadir recetas
if (!ingredients.Any(o => o.Name.Contains(ing.Name)))
//if (!ingredients.Any(o => o.Name.Contains(ing.Name)))
//ingredients.Add (ing.Name);
ingredients.Add(new Ingredient() { Name = ing.Name, Id = ing.Id });
} //endforeach
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment