Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 20th, 2007, 12:37 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Modifications to Appointment Booking...

Hi,

I am working on the Appointment Booking project. I need help in making some initial modifications. The scenario is-
The rooms are divided into 3 categories depending on the capacity. So first of, I need to ask how many people are attending the meeting. Depending on the response, I show them the list of small, medium or large rooms. The second thing is that I need half hour increments instead of one hour but when I make the change I get an error.

Could someone please help me in resolving this...

Help is greatly appreciated!
  #2 (permalink)  
Old March 20th, 2007, 12:51 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

I think you'll need to add a BookingType to the BookingObject table that defines the small, medium or large rooms. Then in the wizard, have the user select the type and then send it to the availability checker sproc as an additional WHERE parameter.

With regards to the half hour: what change and what error?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old March 20th, 2007, 01:39 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for such a fast response! I will try it the way you mentioned.

For the half hour increment, what I mean is I changed the code in the duration portion but it is unable to calculate the right duration because of 30 minutes. Can you tell me what the right way to do it is. Also how do I change the first available working hour list to have 30 min increments like 7:00, 7:30, 8:00 etc
  #4 (permalink)  
Old March 20th, 2007, 02:24 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

There's quite a bit that you need to change. Unfortunately, I don't have the time to dig into this real deep right now, so I can only give you some pointers.

Fortunately, a lot of functionality is encapsulated in the HourPicker.ascx control, so you should start by changing that control. In the For i As Integer = StartTime To EndTime loop, you'll need to add two items: one for the full hour, and one for the half hour.

However, you should realize that previously, the full hour is the value for the drop down which is returned in SelectedHour. However, now with half hours you can no longer return an Integer. Instead, you could return something like a TimeSpan (starting from 0:00 to the "selected time", a DateTime (with the select hour as the hour) or even a string. Alternatively, you can expose the SelectedHour and SelectedMinutes as separate properties.

From there, you'll need to change the other pages that consume the control. For example, CreateAppointment.aspx.vb uses hpTime.SelectedHour to get the selected hour from the Timepicker. By now, this has changed to a DateTime, a TimeSpan or a String or to separate properties, so you'll need to make changes accordingly.

A good thing is that the actual appointment uses a DateTime. So, to add a starting time of 7:30, you can do something like this:

myAppointment.StartDate = _
   calStartDate.SelectedDate.AddHours(7).AddMinutes(3 0)

And things would continue to work.

You'd derive the 7 and the 30 from the HourPicker's SelectedTime property.

Finally, you'll need to change some of the stored procedures as they're using hours to do the calculation.

Hope this helps a little,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #5 (permalink)  
Old March 21st, 2007, 02:04 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

Thanks for the pointers.I'll try & hopefully be able to progress through. I am new to ASP.NET and this is my first project.I really appreciate your guidance.

Thanks again,
Kumar

  #6 (permalink)  
Old March 21st, 2007, 02:30 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You're welcome. And good luck; you may need it of this is your very first ASP.NET 2 project... ;)

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #7 (permalink)  
Old March 28th, 2007, 12:32 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know Imar gave me an outline how to do this but I am having issues with the hour, minute problem. Would someone be able to provide me with the code. Appreciate all the help!

  #8 (permalink)  
Old March 31st, 2007, 01:51 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Kumar,

I think it's hard for others that don't have the book to come up with a solution, as they don't know what you're building and what needs to be changed.

So, I think it's a good idea to indicate exactly *what* issues you have with the hour and minute problem. If you already have some code that doesn't work you can post that too.

That way, it's easier for others (and for me as well), so see what you're having problems with, so we can suggest something useful.

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 


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
Appointment Booking KDSTECH BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 May 29th, 2008 12:46 AM
Appointment booking philblack1 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 January 25th, 2008 01: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
Appointment Booking Problem richardson167 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 February 26th, 2007 07:00 AM



All times are GMT -4. The time now is 01:36 PM.


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