Exemplo n.º 1
0
 /// <summary>
 /// Responsible to populate data in to the collection which will be displayed in app.
 /// </summary>
 private void PopulateCleaningTaskList()
 {
     try
     {
         IsRefreshing     = true;
         source           = _cleaningListDataService.FetchDataForEntityAsync().Result;
         UserSelectedDate = DateTime.Now;
         IsRefreshing     = false;
     }
     catch (Exception ex)
     {
         CleaningTasks.Clear();
         App.Current.MainPage.DisplayAlert(
             "Error",
             $@"An error occured while fetching data. Please contact your service administrator with below information. 
             -------------------------------------------------   
             {ex.Message}
             -------------------------------------------------",
             "OK");
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// <inheritdoc/>
        /// </summary>
        public async Task <List <CleaningListJobItem> > FetchDataForEntityAsync()
        {
            var dataFromServer = await _carFitClientDtoDataService.FetchDataForEntityAsync();

            return(_carFitClientListCleaningListMappingService.MapSourceToTarget(dataFromServer));
        }