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();
        }
示例#2
0
 protected void DataPagerFacilities_PreRender(object sender, EventArgs e)
 {
     FacilitiesList.DataSource = _fa.GetFacilities();
     FacilitiesList.DataBind();
 }
示例#3
0
 protected void LoadFacilitiesList()
 {
     FacilitiesList.DataSource = _fa.GetFacilities();
     FacilitiesList.DataBind();
 }