Beispiel #1
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) //when the row changes
        {
            if (Session["login"] != null)                                         //check if user is logged
            {
                ButtonLogin.Visible = false;
                ButtonBuy.Visible   = true;

                Nights.Visible    = true;
                LNights.Visible   = true;
                Adults.Visible    = true;
                LAdults.Visible   = true;
                Children.Visible  = true;
                LChildren.Visible = true;
            }
            else
            {
                ButtonLogin.Visible = true;
                ButtonBuy.Visible   = false;
            }
            d = h.searchIDHotels(GridView1.SelectedRow.Cells[6].Text);
            //show info in grids
            GridView2.DataSource = d;
            GridView2.DataBind();

            GridView3.DataSource = d;
            GridView3.DataBind();

            d = c.searchCompanyID(GridView1.SelectedRow.Cells[4].Text);
            GridView4.DataSource = d;
            GridView4.DataBind();

            d = x.searchExtrasID(GridView1.SelectedRow.Cells[5].Text);
            GridView5.DataSource = d;
            GridView5.DataBind();

            Label10.Visible = true;
            Label11.Visible = true;

            //  ClientScript.RegisterStartupScript(GetType(), "ScrollScript", "window.onload = function() {document.getElementById('objectid').scrollIntoView(true);}", true);

            // Response.Redirect("~/Hotel.aspx#Middle");

            GridView1.Visible  = false;
            hCity.Visible      = false;
            Place2.Visible     = false;
            SendButton.Visible = false;
            // Form.Visible = false;
        }
Beispiel #2
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) //when select a row
        {
            if (Session["login"] != null)                                         //if the user is login
            {
                ButtonLogin.Visible = false;
                ButtonBuy.Visible   = true; //button buy visible
                Adults.Visible      = true;
                LAdults.Visible     = true;
                Children.Visible    = true;
                LChildren.Visible   = true;
            }
            else
            {
                ButtonLogin.Visible = true; //botton login visible
                ButtonBuy.Visible   = false;
            }
            d = B.searchIDBuses(GridView1.SelectedRow.Cells[5].Text);

            //show info in different grids

            GridView2.DataSource = d;
            GridView2.DataBind();

            GridView3.DataSource = d;
            GridView3.DataBind();

            d = c.searchCompanyID(GridView1.SelectedRow.Cells[3].Text);
            GridView4.DataSource = d;
            GridView4.DataBind();

            d = x.searchExtrasID(GridView1.SelectedRow.Cells[4].Text);
            GridView5.DataSource = d;
            GridView5.DataBind();

            Label10.Visible = true;
            Label11.Visible = true;

            GridView1.Visible  = false;
            FromText.Visible   = false;
            from.Visible       = false;
            to.Visible         = false;
            toText.Visible     = false;
            SendButton.Visible = false;
        }
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) //when the selected index changes
        {
            if (Session["login"] != null)                                         //when the user is logged
            {
                ButtonLogin.Visible = false;                                      //change the visibiliyy of the buttons
                ButtonBuy.Visible   = true;
                Adults.Visible      = true;
                LAdults.Visible     = true;
                Children.Visible    = true;
                LChildren.Visible   = true;
            }
            else
            {
                ButtonLogin.Visible = true;
                ButtonBuy.Visible   = false;
            }
            d = cr.searchIDCruises(GridView1.SelectedRow.Cells[5].Text);

            //show diferent info in grids
            GridView2.DataSource = d;
            GridView2.DataBind();

            GridView3.DataSource = d;
            GridView3.DataBind();

            d = c.searchCompanyID(GridView1.SelectedRow.Cells[3].Text);
            GridView4.DataSource = d;
            GridView4.DataBind();

            d = x.searchExtrasID(GridView1.SelectedRow.Cells[4].Text);
            GridView5.DataSource = d;
            GridView5.DataBind();

            Label10.Visible = true;
            Label11.Visible = true;

            GridView1.Visible  = false;
            CityText.Visible   = false;
            RegionText.Visible = false;
            SendButton.Visible = false;
            dep.Visible        = false;
            region.Visible     = false;
        }
Beispiel #4
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) //when the row index changes
        {
            if (Session["login"] != null)                                         //if user is logged
            {
                ButtonLogin.Visible = false;                                      //change visibility
                ButtonBuy.Visible   = true;
                Adults.Visible      = true;
                LAdults.Visible     = true;
                Children.Visible    = true;
                LChildren.Visible   = true;
            }
            else
            {
                ButtonLogin.Visible = true;
                ButtonBuy.Visible   = false;
            }
            d = T.searchIDTrains(GridView1.SelectedRow.Cells[5].Text); //filter results
            //show data
            GridView2.DataSource = d;
            GridView2.DataBind();

            GridView3.DataSource = d;
            GridView3.DataBind();

            d = c.searchCompanyID(GridView1.SelectedRow.Cells[3].Text);
            GridView4.DataSource = d;
            GridView4.DataBind();

            d = x.searchExtrasID(GridView1.SelectedRow.Cells[4].Text);
            GridView5.DataSource = d;
            GridView5.DataBind();

            Label10.Visible = true;
            Label11.Visible = true;

            GridView1.Visible  = false;
            FromText.Visible   = false;
            from.Visible       = false;
            to.Visible         = false;
            toText.Visible     = false;
            SendButton.Visible = false;
        }
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) //when row changes
        {
            if (Session["login"] != null)                                         //if user is logged
            {
                ButtonLogin.Visible = false;                                      //change visibily
                ButtonBuy.Visible   = true;
                Adults.Visible      = true;
                LAdults.Visible     = true;
                Children.Visible    = true;
                LChildren.Visible   = true;
            }
            else
            {
                ButtonLogin.Visible = true;
                ButtonBuy.Visible   = false;
            }
            d = SP.searchIDSpaceTravels(GridView1.SelectedRow.Cells[5].Text);
            //show info in grids
            GridView2.DataSource = d;
            GridView2.DataBind();

            GridView3.DataSource = d;
            GridView3.DataBind();

            d = c.searchCompanyID(GridView1.SelectedRow.Cells[3].Text);
            GridView4.DataSource = d;
            GridView4.DataBind();

            d = x.searchExtrasID(GridView1.SelectedRow.Cells[4].Text);
            GridView5.DataSource = d;
            GridView5.DataBind();

            Label10.Visible = true;
            Label11.Visible = true;

            GridView1.Visible  = false;
            City.Visible       = false;
            from.Visible       = false;
            SendButton.Visible = false;
        }
Beispiel #6
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) //when a row is selected
        {
            if (Session["login"] != null)                                         //if the user is login
            {
                ButtonLogin.Visible = false;
                ButtonBuy.Visible   = true; //button buy visible
            }
            else
            {
                ButtonLogin.Visible = true;
                ButtonBuy.Visible   = false;
            }
            d = car.searchIDCarRental(GridView1.SelectedRow.Cells[6].Text);

            //show info in different grids
            GridView2.DataSource = d;
            GridView2.DataBind();

            GridView3.DataSource = d;
            GridView3.DataBind();

            d = c.searchCompanyID(GridView1.SelectedRow.Cells[4].Text);
            GridView4.DataSource = d;
            GridView4.DataBind();

            d = x.searchExtrasID(GridView1.SelectedRow.Cells[5].Text);
            GridView5.DataSource = d;
            GridView5.DataBind();

            Label10.Visible = true;
            Label11.Visible = true;

            GridView1.Visible  = false;
            CityText.Visible   = false;
            from.Visible       = false;
            brandcar.Visible   = false;
            brandText.Visible  = false;
            SendButton.Visible = false;
        }