public async void selShowList() { if (SelectCountry == "Всі країни") { spi_list = list_showPlace; } else { spi_list.Clear(); var t = from i in await proxy.GetAllImagesShowPlaceAsync() join sp in await proxy.GetAllShowPlaceAsync() on i.Id equals sp.Id join ct in await proxy.GetAllCitysAsync() on sp.CityId equals ct.Id join c in await proxy.GetAllCountryAsync() on ct.CountryId equals c.Id where c.CountryName == SelectCountry select new { i.ImageURL, sp.ShowPlaceName, ct.CityName, c.CountryName }; foreach (var item in t) { spi_list.Add(new ShowPlaceInfo { IMG = item.ImageURL, NAME = item.ShowPlaceName, CITY = item.CityName, COUNTRY = item.CountryName }); } } }
public async void selShowList() { if (SelectCountry == "Всі країни") { hotel_list = list_showHotel; } else { hotel_list.Clear(); var t = from i in await proxy.GetAllImagesHotelsAsync() join h in await proxy.GetAllHotelsAsync() on i.Id equals h.Id join ct in await proxy.GetAllCitysAsync() on h.CityId equals ct.Id join c in await proxy.GetAllCountryAsync() on ct.CountryId equals c.Id where c.CountryName == SelectCountry select new { i.ImageURL, h.HotelsName, ct.CityName, c.CountryName }; foreach (var item in t) { hotel_list.Add(new HotelInfo { IMG = item.ImageURL, NAME = item.HotelsName, CITY = item.CityName, COUNTRY = item.CountryName }); } } }