Exemple #1
0
        public ShowPlaces()
        {
            proxy = new AgensyServiceClient();
            list_showPlace = new List<ShowPlaceInfo>();
            var t = from i in proxy.GetAllImagesShowPlace()
                    join sp in proxy.GetAllShowPlace() on i.Id equals sp.Id
                    join ct in proxy.GetAllCitys() on sp.CityId equals ct.Id
                    join c in proxy.GetAllCountry() on ct.CountryId equals c.Id
                    select new { i.ImageURL, sp.ShowPlaceName, ct.CityName, c.CountryName };
            spi_list = new List<ShowPlaceInfo>();
            countries = proxy.GetAllCountry();
            cities = proxy.GetAllCitys();

            CB_COUNTRY_LIST = new List<string>();
            CB_COUNTRY_LIST.Add("Всі країни");
            SelectCountry = "Всі країни";
            foreach (var item in countries)
            {
                CB_COUNTRY_LIST.Add(item.CountryName);
            }

            


            foreach (var item in t)
            {
                spi_list.Add(new ShowPlaceInfo { IMG = item.ImageURL, NAME = item.ShowPlaceName, CITY = item.CityName, COUNTRY = item.CountryName });
            }
            list_showPlace = spi_list;
        }
Exemple #2
0
        public ShowHotel()
        {
            proxy          = new AgensyServiceClient();
            list_showHotel = new List <HotelInfo>();
            var t = from i in proxy.GetAllImagesHotels()
                    join h in proxy.GetAllHotels() on i.Id equals h.Id
                    join ct in proxy.GetAllCitys() on h.CityId equals ct.Id
                    join c in proxy.GetAllCountry() on ct.CountryId equals c.Id
                    select new { i.ImageURL, h.HotelsName, ct.CityName, c.CountryName };

            hotel_list = new List <HotelInfo>();
            countries  = proxy.GetAllCountry();
            cities     = proxy.GetAllCitys();

            CB_COUNTRY_LIST = new List <string>();
            CB_COUNTRY_LIST.Add("Всі країни");
            SelectCountry = "Всі країни";
            foreach (var item in countries)
            {
                CB_COUNTRY_LIST.Add(item.CountryName);
            }



            foreach (var item in t)
            {
                hotel_list.Add(new HotelInfo {
                    IMG = item.ImageURL, NAME = item.HotelsName, CITY = item.CityName, COUNTRY = item.CountryName
                });
            }
            list_showHotel = hotel_list;
        }