示例#1
0
 private void AddFavourites()
 {
     ShowLoader();
     Favourites.Clear();
     Favourites.AddRange(UnitOfWork.FavouriteRepository.GetAll().OrderByDescending(x => x.LastUsedDate));
     ShowList();
 }
示例#2
0
        private void TimerTickSearch(object sender, EventArgs e)
        {
            timerSearch.Stop();

            ShowHeaderLoader();

            if (isFavouritesView)
            {
                IEnumerable <Favourite> favourites = UnitOfWork.FavouriteRepository.GetByName(searchText);

                Favourites.Clear();
                Favourites.AddRange(favourites);
            }
            else
            {
                IEnumerable <Recent> recentTrips = UnitOfWork.RecentTripRepository.GetByName(searchText);

                RecentTrips.Clear();
                RecentTrips.AddRange(recentTrips);
            }

            HideHeaderLoader();

            ShowList();
        }