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 September 15th, 2006, 02:18 PM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default modifying Webshop

I am attempting to modify the Webshop described in Chapter 9 of ASP.NET 2.0 Instant Results. I need to remove all references to price, both on the store side and the admin side, as the items being ordered do not have any cost associated with them. Is there an easy way to do this without screwing up the other working elements? Any assistance with this matter will be greatly appreciated.

 
Old September 15th, 2006, 06:47 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,

It's certainly possible, but it may take some time.

Here's what I would do:

1. Remove all references to the price from the database tables.

2. Remove all references to the price from the stored procedures.

3. Remove all references to the price in the business layer (like the Product class and the Shopping Cart)

4. Compile.

5. This results in a number of errors, most of which should be easy to fix. For example, the code that sends the price to the database. Since the price is sent in a param, all you need to do is delete the reference to the price in the param setup.

6. With the business later and data access layer done, you should be able to compile them again. After that, you can use search and replace to find references to the price in the aspx pages and remove them.

This should again be pretty easy, because price is "just another item". So, it's a column in a grid, a row in a table and so on.

Let me know if this works for you, or when you have additional questions...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
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.
 
Old September 21st, 2006, 01:10 PM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks very much. That seems to have taken care of the pricing elements. The other thing I have to do is to include additional fields in product details, and I guess I'm just slow, but I'm really not sure how to begin. I need to include a requested completion date, a set of optional special instructions for each order, and several bit fields, depending on the type of job being rquested (new, change or reprint). I'm fairly new at this; any suggestions that might get me pointed in the right direction would be greatly appreciated.

 
Old September 23rd, 2006, 05:12 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 mlevans,

I would almost recommend doing the opposite of what you did when you removed the Price element:

1. Add your new fields in the database tables.

2. Add your new fields to the stored procedures.

3. Add your new fields in the business layer objects (like the Product class and the Shopping Cart)

5. Extend the data access layer to include the new fields, getting them from and passing them to the stored procedures that access the database.

6. Extend the aspx pages and add your new fields.

Sorry if this sounds too obvious but I really think this is the way to do it....

If there are specific areas that you need help with, please let me know.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Webshop gogetsome BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 March 7th, 2008 03:07 PM
C# code for webshop dhanuka BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 November 29th, 2007 12:10 AM
Webshop modification El Presidente BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 21 December 6th, 2006 03:14 PM
Webshop Modification saf BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 November 3rd, 2006 07:49 PM
WebShop (Chap 9) Question SDonnelly BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 18 May 23rd, 2006 11:33 AM





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