Ejemplo n.º 1
0
        protected void tableFlights_SelectedIndexChanged(object sender, EventArgs e)
        {
            int index = tableFlights.SelectedIndex;
            if(index >= 0)
            {
                Flight selectedFlight = flights[tableFlights.SelectedIndex];
                string selectedCity = selectedFlight.cityTo;

                libGetInfos libInfos = new libGetInfos();
                hotels = libInfos.getListHotelsOfCity(selectedCity);
                tableHotels.DataSource = hotels;
                tableHotels.DataBind();
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            libGetInfos libInfos = new libGetInfos();

            // Génération liste des vols
            flights = libInfos.getListFlights();
            tableFlights.DataSource = flights;
            tableFlights.DataBind();

            // Génération liste des hôtels
            hotels = libInfos.getListHotels();
            tableHotels.DataSource = hotels;
            tableHotels.DataBind();

        }