protected void btnAirlineBookedSearch_OnClick(object sender, EventArgs e) { if (Session["LoggedInUser"] != null) { if (ddlAirbus.SelectedValue != null) { 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(), int.Parse(ddlAirbus.SelectedValue), DateTime.Parse(txtTravelDate.Text)); ddlAvailableSeatNumbers.DataValueField = "airbus_seats_id"; ddlAvailableSeatNumbers.DataTextField = "airbus_seats_number"; ddlAvailableSeatNumbers.DataBind(); } } }
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(); }