Beispiel #1
0
 private async void ValidateResponseAllFaqs(ResponseFaqs responseFaqs)
 {
     if (responseFaqs.Success && responseFaqs.StatusCode == 0)
     {
         GroupCategoriesSubcategories = new ObservableCollection <FaqCompleteViewModel>();
         AllFaqs = new ObservableCollection <FaqCompleteViewModel>();
         foreach (FaqComplete item in responseFaqs.Faqs)
         {
             FaqCompleteViewModel faq = new FaqCompleteViewModel
             {
                 AnswerText      = item.AnswerText,
                 CategoryName    = item.CategoryName,
                 Question        = item.Question,
                 SubCategoryName = item.SubCategoryName,
             };
             GroupCategoriesSubcategories.Add(faq);
         }
         AllFaqs       = GroupCategoriesSubcategories;
         IsVisibleFind = GroupCategoriesSubcategories.Count == 0;
     }
     else
     {
         await dialogService.ShowMessage(responseFaqs.Title, responseFaqs.Message);
     }
 }
Beispiel #2
0
        public async Task LoadFaqs()
        {
            SearchText = string.Empty;
            dialogService.ShowProgress();
            ResponseFaqs responseFaqs = await apiService.GetAllFaqs();

            dialogService.HideProgress();
            ValidateResponseAllFaqs(responseFaqs);
            Search();
        }