Exemplo n.º 1
0
        private async Task LoadStatuses()
        {
            var statuses = await _orderStatusRepository.GetAllAsync();

            foreach (var status in OrderStatuses)
            {
                status.PropertyChanged -= WrappedStatus_PropertyChanged;
            }

            OrderStatuses.Clear();
            foreach (var status in statuses)
            {
                var wrappedStatus = new OrderStatusWrapper(status);
                wrappedStatus.PropertyChanged += WrappedStatus_PropertyChanged;
                OrderStatuses.Add(wrappedStatus);
            }
        }
Exemplo n.º 2
0
 public async Task <List <OrderStatus> > GetAllOrderStatusesAsync()
 {
     return(await orderStatusesRepository.GetAllAsync());
 }