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 July 22nd, 2008, 03:03 AM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Extending Appointment booking application

Hello Imar,

Following your suggestion I have created this new thread.
I do my best to not waist your time and mainly ask design questions. Here is a short list of what I have to add to the application:

The owner of the application (administrators) will create one or more companies,
for each company will create one user,
to each company will assign number of booking objects lets say conference rooms
employees of that company with the same user id and password will login to book a place in a specific conference room for a specific date, so n employee can book the same booking object.

To add the company entity I though of 2 different solutions:
1. use similar design as you have used for booking object, i.e. create Company, CompanyManager and CompanyManagerDB classes with similar behaviours as for Booking Object classes.
The issue in this case is how to relate a company to a user, in other words during the sign-up how to get the current user being created by administrators and associate that with the company ID

2. use the membership table and create new roles which actually are companies that administrators needed. In this way we can get most of information directly from membership table including which user belongs to which company.
The issue with this design is how to generate roles within the application so we can use it later for associations.
As you suggested I am going to read the chapter 12 to get more information on membership table and related actions.

Which of above directions do you think would be simpler and most effective to take or do you believe there could be a better way to implement the company entity?

Many thanks in advance.

 
Old July 22nd, 2008, 11:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi babak,

I would go for option 1. The CreateUserWizard fires a CreatedUser event which you handle to assign the user to a company. Take a look here:

http://weblogs.asp.net/scottgu/archi...18/427754.aspx

Scott shows you how to hook into this event. In his case, he uses it to assign roles and store data in the Profile, but you can use the same principles to store data in your own model.

Hope this helps; and don't worry about wasting my time. If it's about my books, it's never a waste of time.... ;)

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old July 22nd, 2008, 12:35 PM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much Imar, that's an excellent lead.

Regards,

 
Old July 22nd, 2008, 02:04 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome. Good luck...

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old September 15th, 2008, 01:41 PM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Imar,

Thank you for all your help. After your last reply I did some good work on this application but as happens had to stop it and complete another high priority project. Now I am back on Appointment Booking application and have few days to complete it.

One of the main changes I have to add is to enable multiple bookings of the conference room for the same user and same date.

I thought to add a new column in BookingObject table to have the max number of bookings for that Conference Room and then in TimeSheet.ascx.vb check the number of appointments for each Conference Room and each booking time, perhaps by doing some Linq to sql. what do you think about this?
also will fix the booking time so users can only book the conference room for one session interval.
the only issue with this is the code will check multiple times for the same booking interval while is looping through appointments.

Another main extension is to change appointment interval Time from one hour to 30 minutes and viseversa, perhaps by setting this in web.config. On this issue do not have yet a clear idea, could you please give me some directions?

One last question which is more general is about mixing master pages and xslt, do you think this is possible and is a good practice? do you have any links to articles on this topic?

I am also reading your new book on .net 3.5 and find it very interesting as your style of by examples following user experience is really helpful.

Looking forward to your reply and as always thank you very much in advance.

Regards,
Babak

 
Old September 15th, 2008, 02:11 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 Babak,

You're asking pretty broad questions, so all I can give you is vague answers in return.....

1. Linq to sql: sure, sounds like a good plan, as does keeping track of the number of available rooms.

2. The interval shouldn't be too difficult: the hour pucker now loops for each hour, but you could easily change that to loop for 30 minutes instead.

3. Master pages and XSLT: I'm not sure what you're asking. Why wouldn't that be a good idea? I don't see that as any different that XSLT in any other page. Of course, since a master page is used on many other pages, you want it to perform fast....

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old September 16th, 2008, 02:54 AM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you very much Imar,

 
Old September 16th, 2008, 12:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did it help? Even though the answers were a bit vague?

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old September 18th, 2008, 07:22 AM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

I used another approch to make my life easier, by adding couple of new tables and stored procedure to do the job.

I am still working on it and it is proceding.

On the point of using master pages and xslt what I meant is how can you use one or more master pages and for example use xml and xslt for one of you pages, in other words render the content in the asp:Content using xml and xslt? have seen this anywhere?

Many thanks,
Babak

 
Old September 20th, 2008, 12:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

XML and XSLT to build up the UI is a common thing to do in ASP.NET. Doing so in Master Pages and Content Pages also makes a lot of sense. (E.g. put behavior and data that applies to all pages in the master, and the rest in content pages).

However, I am not sure if that's a useful answer as again I am not sure what you are really asking. You merely make a statement about it being possible (which it is) and whether I have seen it (which I have)....

Imar


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





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
Cannot run Appointment Booking application... beskra BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 May 16th, 2008 03:18 AM
Appointment booking philblack1 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 January 25th, 2008 01:17 PM
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 outofwork BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 42 May 15th, 2007 04:56 PM





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