protected void ViewBookedFacilities() { SqlConnection conn = new SqlConnection ("Server=DESKTOP-41H50KG\\SQLEXPRESS; Database=clubone; Uid=20201113; password=123456"); conn.Open(); SqlCommand cmd = new SqlCommand("select Facility.fName, BookingFacility.days, BookingFacility.timeSlot, BookingFacility.status from BookingFacility, Facility where userID=@UID and BookingFacility.facilityID = Facility.fID", conn); cmd.Parameters.Add("@UID", System.Data.SqlDbType.Int, 100).Value = Session["user_id"]; SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataTable dt_bookedFacilities = new DataTable(); adapter.Fill(dt_bookedFacilities); FacilitiesList.DataSource = dt_bookedFacilities; FacilitiesList.DataBind(); }
protected void DataPagerFacilities_PreRender(object sender, EventArgs e) { FacilitiesList.DataSource = _fa.GetFacilities(); FacilitiesList.DataBind(); }
protected void LoadFacilitiesList() { FacilitiesList.DataSource = _fa.GetFacilities(); FacilitiesList.DataBind(); }