Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am doing project on tourism guide.. in that i m provide facility of booking hotel room for customer online..
but i m confused to how to get dates which are not book for a particular room...
my hotel table structure is like this :

hotel_mast 
------------------ 
hotel_Code(p.k) 
hotel_name 
hotel_address 
hotel_City 

room_detail 
------------------- 
room_Code 
hotel_Code(f.k) 
room_Type 
room_Rate 
no_of_room 
room_availability 

booking_mast 
------------------- 
book_Code(p.k) 
hotel_Code(f.k) 
room_Code(f.k) 
check_in_date 
check_out_date 
total_Amount 



please.. help me to get date.. within 15 days my submission of my project is coming... so please help me..
Sachi ...
plz give ans in asp.net with c# language..
Posted
Updated 9-Oct-11 23:53pm
v2

1 solution

This seems to me logically flawed: in the real world both the potential customer, and the hotel employees do not need to know the "dates which are not booked for a room."

What they do need to know are which dates are booked. Then for either customer or employee (or both) you could construct a visual user interface (DateTimePicker ?) that, since it shows all bookings, implicitly shows all available dates.

I guess you could have the rarer (?) case that someone wanted a specific room, and wanted to know when it was available, but in that case you'd still want to have some kind of time frame: some kind of basis for a query like: 'in the last week of December, 2011, what days is Room #302 available' ?

Or, if there's no visual user interface, you want to be able to take a customer's proposed starting date, and length of stay, and do a query that returns all rooms available ?

So then 'room availability' becomes a query against your database, not a 'room-detail' Table field ?

good luck with your homework !
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900