Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 23rd, 2005, 06:41 PM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default What's the logic behind this Hotel Booking system?

Hi guys,
I have a strong problem that I just can't resolve becouse it's too difficult for me: hope you can help...
(the problem has more to do with programming than with "strict" ASP, but I write my pages in ASP so...)

I'd like to set a multi-Hotel Booking system, and to make things user-friendly I'd like the user to enter only start date, end date, # of people and # of rooms

I just can't understand how can I calculate the various combinations of people/rooms and what's the algorithm behind... to be clear, my "inspiration" is www.venere.com, an italian site: here's a "live" example of what I'd like to achieve:

http://www.venere.com/hotel/index.php?htid=2302&lg=en

Just put dates from 01 november to 02 november and "play" with people and rooms: I found that:

- 1 people/1 room > 1 single room
- 2 people/1 room > 1 double room
- 3 people/1 room > 1 triple room
- 4 people/1 room > 1 quad room

- 2 people/2 rooms > 2 single rooms
- 3 people/2 rooms > 1 double + 1 single rooms
- 4 people/2 rooms > 2 double rooms
- 5 people/2 rooms > 1 double + 1 triple (but not 1 quad + 1 single: why? what's the logic behind? :-/)
- 6 people/2 rooms > various combinations (please check by ourself)

- 3 people/3 rooms > 3 single rooms
- 4 people/3 rooms > 2 single + 1 double rooms
- 5 people/3 rooms > 1 single + 2 double rooms (why not 1 triple + 2 singles?)
- 6 people/3 rooms > 3 double rooms

And so on...

I can imagine the DB structure for Rooms, maybe something like:
----------------------------------------
ID
Type (single, double, etc...)
Quantity (# of available rooms)
MaxPeople (people allowed for the room)
----------------------------------------
But... is there a "mathematical" logic in the scheme people/rooms above? Is there a function or a set of functions that describe these calculations? I'm sure there's one (the site is working great!) but I really can't find it...

Anyone would try, please? Thanks really so much, this is the most difficult thing I've ever found in my (ehm... short) career!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
booking system newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 July 19th, 2007 04:17 PM
Modifications in Appointment Booking System newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 July 18th, 2007 11:49 AM
Appointment Booking System newbie07 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 July 18th, 2007 08:32 AM
Access 97 and a booking system narelleallen Access 2 June 24th, 2004 10:04 AM
Celendar Booking System acdsky Classic ASP Basics 0 March 31st, 2004 02:42 AM



All times are GMT -4. The time now is 05:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.