Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 19th, 2008, 02:40 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Appointment booking system

It is a useful system. However, I find some problem about the booking! For example,
After I finished to book "Conference Room 2 - West Wing" 9:00am - 10:00am (1hr) and if I want to book this same Room from 8:00am - 11:00am (3hrs), it also working! Finally, I will get two duplicate time booking, is that possible to solve this problem by change the program code? Can you help me?
 
Old December 19th, 2008, 04:50 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Looks like there's a bug in the stored procedure that checks the availability. Check out page 337 and 338 and to the very end of it, before the two closing parentheses, add this:

OR (@startDate <= StartDate AND @endDate >= EndDate)

This takes care of the case where the new appointment has a starting date/time before an existing and an ending date/time after an existing one.

I ran some quick unit tests, and it seems to work fine. Can you check if it works for you as well and let me know? Then I'll have this fix added to the errata section.

Cheers

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 21st, 2008, 11:36 PM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Imar,
The page 337-338 only show the code but I can't find the file! I scan the check availability.aspx, AppointmentManagerDB.vb and other files but I don't know where they put! Can you show me which file?

Regards,
Eric
 
Old December 22nd, 2008, 07:21 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It's not a code file, but a stored procedure in the database....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 23rd, 2008, 04:39 AM
Registered User
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you! It is working now! No more duplicate booking!

Eric
 
Old December 23rd, 2008, 06:35 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great; glad it's working now.... I'll have this added to the errata section.....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10: Appointment Booking System shong BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 August 21st, 2008 04:04 AM
Chapter 10: Appointment Booking System shong BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 July 21st, 2008 01:38 PM
Appointment Booking KDSTECH BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 May 29th, 2008 12:46 AM
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





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