Hotel Booking problem

S

Steven Blair

Hi,

I am looking for some feature in c# wich will help me solve a nasty
little problem I have with a application I am writing.

It's Hotel Booking system. The bookings are held on a Database and I
need to work out if a room is booked during a particular date range.

e.g. Room 1 is booked between 20/04 - 30/04. I need some way of
indicating that the the 19/04 (one night stay) is available. The 26/04 -
27/04 is unavailable and the 01/05 - 03/05 is available.

Is there some easy to use feature in C# that can help me out?

I have been working on this for a couple of weeks and used most
combinations in my SQL to attempt to select the avaiable rooms but one
of these cases always seems to fall through it.

If anyone give me some pointers or even suggest another way forward it
would be appreciated.

Regards,

Steven
 
A

Angel J. Hernández M.

Hi there... you could handle this by creating a view or a stored procedure
in SQL Server then call it from your application.

Regards,
 
S

Steven Blair

Hi,

Yeah but my main problem is how to work out if the room is avaiable. I
am looking for soemthing which will simplify the date checking.

At the moment I am using SQL against my DB but cannt get the logic
correct.

Regards,

Steven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top