Beispiel #1
0
        private async void LoadCustomersOrders()
        {
            try
            {
                if (SelectedCustomer != null)
                {
                    var orders = await _orderRepository.GetOrdersForCustomersAsync(SelectedCustomer.Id);

                    SelectedCustomer.OrdersList = await OrdersMapper.Map(orders);
                }
            }
            catch (Exception e)
            {
                Logger.Error(e);
            }
        }
Beispiel #2
0
        private async Task LoadOrders()
        {
            try
            {
                IsBusy = true;

                OrdersList = await OrdersMapper.Map(await _repo.GetOrdersAsync());

                OrdersView = CollectionViewSource.GetDefaultView(OrdersList);

                SelectedItemGroup = ItemsGroup[0];
            }
            catch (Exception e)
            {
                Logger.Error(e);
            }
            finally
            {
                IsBusy = false;
            }
        }
Beispiel #3
0
        public async void LoadOrders(DateTime fromDate, DateTime toDate)
        {
            var filteredOrders = await _orderRepository.GetCustomerOrdersPerPeriod(SelectedCustomer.Id, fromDate, toDate);

            SelectedCustomer.OrdersList = await OrdersMapper.Map(filteredOrders);
        }