Esempio n. 1
0
        /// <summary>
        /// Initial Load Orders from SQL
        /// </summary>
        async void LoadOrders()
        {
            // Boot up sql
            var repo = new Library.Repository.OrdersRepository("orders");
            var res  = await repo.GetAllAsync();

            // using the Enum.Foreach extension
            res.ForEach(item => Orders.Add(item));
        }
Esempio n. 2
0
        /// <summary>
        /// Initial Load Orders from SQL
        /// </summary>
        async void LoadOrders()
        {
            // Boot up sql
            var repo = new Library.Repository.OrdersRepository("orders");
            var res  = await repo.GetAllAsync();

            // using the Enum.Foreach extension
            res.ForEach(item => { if (item.Orderstatus == 1)
                                  {
                                      Orders.Add(item);
                                  }
                                  if (item.Orderstatus == 2)
                                  {
                                      OrdersDone.Add(item);
                                  }
                        });
        }