Click here to Skip to main content
15,917,321 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this tables below

Reservation Table
CheckInDate    datetime    Unchecked
CheckOutdate    datetime    Unchecked
NoOfDays    int    Unchecked
RoomId    int    Unchecked
Booking_Charges    float    Unchecked
NoOfAdults    int    Checked
NoOfKids    int    Checked


room Table
RoomId    int    Unchecked
RoomType    varchar(50)    Unchecked


on my default.aspx

I have this:
ASP.NET
<asp:TextBox ID="TxtCheckIn" runat="server" > 
<asp:TextBox ID="TxtCheckout" runat="server" >
but it uses calendar control...

My Aim is to search the available rooms....as in to get the rooms that is not in reservation table at the particular date selected

How can i achieve that...

Thanks in advance
Posted
Updated 25-Jul-13 23:59pm
v2

1 solution

Hi,

You need to create a table (dates) with all dates. Then you select all dates from the dates table where they are not in the reservations table.
 
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