Esempio n. 1
0
        private async Task LoadDeals()
        {
            try
            {
                IsBusy = true;

                var deals = await _tripsService.GetTripsAsync();

                if (deals != null)
                {
                    Trips = new ObservableCollection <Deal>(deals);

                    CurrentDealStatusViewModel.CheckInDeal = Trips
                                                             .FirstOrDefault();
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine($"Error loading trips data: {ex}");
            }
            finally
            {
                IsBusy = false;
            }
        }