Esempio n. 1
0
 private void LoadData()
 {
     ShoppingLists.Clear();
     shoppingListsModel.LoadShoppingLists();
     foreach (var slm in shoppingListsModel.ShoppingLists)
     {
         ShoppingLists.Add(new ShoppingListViewModel(slm));
     }
 }
        private async Task ExecuteLoadShoppingListsCommand()
        {
            IsBusy = true;

            try
            {
                ShoppingLists.Clear();
                System.Collections.Generic.IEnumerable <ShoppingList> items = await ShoppingListDataStore.GetShoppingListsAsync();

                foreach (ShoppingList item in items)
                {
                    ShoppingLists.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Esempio n. 3
0
 public void LoadShoppingLists()
 {
     ShoppingLists.Clear();
     ShoppingLists = GetData(shoppingListsDAO, productsDAO);
 }