/// <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)); }
/// <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); } }); }