async Task LoadOrders(string value) { LoadingManager.OnLoading(); Status _statusvalue = (Status)Enum.Parse(typeof(Status), value); var orderData = await orderDataStore.GetOrdersOfUserWithSpecificStatus(App.LogUser.UserId, _statusvalue, App.TokenDto.Token); KeyValues.Clear(); KeyValues.Add("orderAdded", orderData); UserOrders.Clear(); foreach (var item in orderData) { item.StoreOrder = await StoreDataStore.GetItemAsync(item.StoreId.ToString()); var presenter = new OrderPresenter(item); UserOrders.Add(presenter); } LoadingManager.OffLoading(); }
public async Task SetOrders() { var userOrderData = orderDataStore.GetUserOrders(App.LogUser.UserId); UserOrders.Clear(); foreach (var item in userOrderData) { item.StoreOrder = await StoreDataStore.GetItemAsync(item.StoreId.ToString()); var presenter = new OrderPresenter(item); UserOrders.Add(presenter); } }