public BookingDetails GetBookingDetails(int bookId)
        {
            aConnection.Open();
            string query = string.Format("SELECT * FROM t_booking_details WHERE id = {0}", bookId);
            SqlCommand aCommand = new SqlCommand(query, aConnection);
            SqlDataReader aReader = aCommand.ExecuteReader();
            BookingDetails bookingDetails = new BookingDetails();
            if (aReader.HasRows)
            {
                while (aReader.Read())
                {
                    bookingDetails.Id = (int)aReader[0];
                    bookingDetails.Destination = aReader[1].ToString();
                    bookingDetails.Distance = Convert.ToDouble(aReader[2].ToString());
                    bookingDetails.Date = aReader[3].ToString();
                    bookingDetails.Time = aReader[4].ToString();
                    bookingDetails.VehicleId= Convert.ToInt32(aReader[5].ToString());

                }
            }
            aConnection.Close();
            return bookingDetails;
        }
        public BookingDetails GetBookingInformation(int regId, string date)
        {
            aConnection.Open();
            string query = string.Format("SELECT * FROM t_booking_details WHERE vehicle_id = {0} AND date = '{1}'", regId, date);
            SqlCommand aCommand = new SqlCommand(query, aConnection);
            SqlDataReader aReader = aCommand.ExecuteReader();
            aBookingDetails = new BookingDetails();
            if (aReader.HasRows)
            {
                while (aReader.Read())
                {
                    aBookingDetails.Destination = aReader[1].ToString();
                    aBookingDetails.Distance = Convert.ToDouble(aReader[2].ToString());
                    aBookingDetails.Date = aReader[3].ToString();
                    aBookingDetails.Time = aReader[4].ToString();
                    aBookingDetails.VehicleId = Convert.ToInt32(aReader[5].ToString());

                }
            }
            aConnection.Close();
            return aBookingDetails;
        }