示例#1
0
 protected void btnAlreadyBookedTickets_OnClick(object sender, EventArgs e)
 {
     if (Session["LoggedInUser"] != null)
     {
         if (ddlAirbus.SelectedValue != null)
         {
             AirlineBL abl = new AirlineBL();
             DataTable dt  = (DataTable)Session["LoggedInUser"];
             gvAirlineBookedSeats.DataSource = abl.GetBookedSlots(dt.Rows[0]["airbus_user_name"].ToString(), dt.Rows[0]["airbus_password"].ToString(), int.Parse(ddlAirbus.SelectedValue));
             gvAirlineBookedSeats.DataBind();
         }
     }
 }
示例#2
0
        private void Clear()
        {
            AirlineBL abl = new AirlineBL();
            DataTable dt  = (DataTable)Session["LoggedInUser"];

            ddlAvailableSeatNumbers.DataSource     = abl.GetSlots(dt.Rows[0]["airbus_user_name"].ToString(), dt.Rows[0]["airbus_password"].ToString(), 0, DateTime.Parse(txtTravelDate.Text));
            ddlAvailableSeatNumbers.DataValueField = "airbus_seats_id";
            ddlAvailableSeatNumbers.DataTextField  = "airbus_seats_number";
            ddlAvailableSeatNumbers.DataBind();

            gvAirlineBookedSeats.DataSource = abl.GetBookedSlots(dt.Rows[0]["airbus_user_name"].ToString(), dt.Rows[0]["airbus_password"].ToString(), 0);
            gvAirlineBookedSeats.DataBind();
        }