public List<BookingHistoryByCat> PopulateDropDownlist()
        {
            List<BookingHistoryByCat> categoryList=new List<BookingHistoryByCat>();
            SqlConnection connection =new SqlConnection(connectionString);
            string query = "Select distinct Category From Facilities";
            SqlCommand command=new SqlCommand(query,connection);
            SqlDataReader reader;
            connection.Open();
            reader = command.ExecuteReader();
            BookingHistoryByCat category = new BookingHistoryByCat();
            category.Category = "Select";
            categoryList.Add(category);
            while (reader.Read())
            {
                category=new BookingHistoryByCat();
                category.Category = reader["Category"].ToString();
                categoryList.Add(category);

            }
            connection.Close();
            return categoryList;
        }
        public List<BookingHistoryByCat> PopulateGridviewByAll()
        {
            List<BookingHistoryByCat> categoryList = new List<BookingHistoryByCat>();
            SqlConnection connection = new SqlConnection(connectionString);
            string query = string.Format("select BookDate,Category,CatName,ASubject,OrgName,StartDate," +
                                         "EndDate,TimeSlot " +
                                         "from Booking_Det");
            SqlCommand command = new SqlCommand(query, connection);
            SqlDataReader reader;
            connection.Open();
            reader = command.ExecuteReader();
            while (reader.Read())
            {
                BookingHistoryByCat category = new BookingHistoryByCat();

                category.BookingDate = reader.GetValue(0).ToString();
                category.Category = reader.GetValue(1).ToString();
                category.CatName = reader.GetValue(2).ToString();
                category.Subject = reader.GetValue(3).ToString();
                category.StartDate = reader.GetValue(4).ToString();
                category.EndDate = reader.GetValue(5).ToString();
                category.TimeSlot = reader.GetValue(6).ToString();
                categoryList.Add(category);

            }
            connection.Close();
            return categoryList;
        }