private async Task ProcessToFetchAllGeners() { try { var movieDetailsService = new MovieDetailsService(); var responce = await movieDetailsService.ProcessToGetGenersListFromServer(); if (responce != null) { if (responce.ListOfGeners != null && responce.ListOfGeners.Count > 0) { GenersList = responce.ListOfGeners; GenresDetails genresDetails = new GenresDetails { GenerId = 0, GenerName = "All" }; GenersList.Insert(0, genresDetails); } } ShowAllTab?.Invoke(GenersList); } catch (Exception ex) { UserDialogs.Instance.Alert(ex.Message, "", "OK"); } }
private void ProcessSelectGenresCommand(GenresDetails selectedGenres) { try { if (selectedGenres.GenerId == 0) { MovieList = MainMovieList; return; } var List = MainMovieList; var ListSelected = List.Where(movie => movie.GenreIds.Contains(selectedGenres.GenerId)); MovieList = new ObservableCollection <MovieDetails>(ListSelected); } catch (Exception ex) { UserDialogs.Instance.Alert(ex.Message, "Apologies", "Ok"); } }
private void ProcessSelectGenresCommand(GenresDetails selectedGenres) { try { try { var navPar = Mvx.Resolve <INavigationParameter>(); navPar.Parameter = new Tuple <string, object>(Constants.NavigationParamKeys.SelectedGenres, selectedGenres); //ShowViewModel<MainDetailPageDetailsViewModel>(); Mvx.Resolve <IMvxNavigationService>().Navigate <MainPageViewModel>(); } catch (Exception ex) { UserDialogs.Instance.Alert(ex.Message, "Apologies", "Ok"); } } catch (Exception ex) { UserDialogs.Instance.Alert(ex.Message, "Apologies", "Ok"); } }