Ejemplo n.º 1
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            await orderLogic.Init();

            await statusLogic.Init();

            await cartLogic.Init();

            var orderList = (from orders in orderLogic.MyOrders
                             join os in statusLogic.Statuses on orders.OrderStatusId equals os.Id
                             orderby orders.Id descending
                             select new OrdersPageModel
            {
                Id = orders.Id,
                OrderDate = orders.OrderDate,
                Status = os.Name,
                TotalCost = orders.TotalCost,
                StatusId = os.Id
            }).ToList();

            General.AllOrders = orderLogic.AllOrders;
            General.AllCart   = cartLogic.AllCart;

            ordersListView.ItemsSource = orderList;
            //ordersListView.ItemSelected += OrdersListView_ItemSelected;
            ordersListView.Refreshing += OrdersListView_Refreshing;
        }