ASP.NET 2.0 Instant Results
.pdf9
Modifying the Wrox
WebShop
Although the WebShop already has quite some useful features, it should be easy to come up with a list of possible extensions and enhancements. Features that come to mind are:
Reporting: It would be very useful to have reports about customers, their buying behavior, and sales figures.
Export Capabilities: The finalized orders are now stored in the database. To process them, you either need a reporting solution or a way to export the orders to another system.
Product Reviews: Let your customers tell others what they think about your products.
Extended Maintenance Section: The current maintenance section is pretty limited. A more comprehensive version could allow you to update existing products, manage the product categories and possibly your customer list.
Different Pricing Mechanism: Each product in the WebShop has a fixed price for all customers. You could change the site so that returning users get a discount. You could also charge for shipping costs; either by product, by weight, or by the entire order.
Another area for improvement is the feedback to the user. Right now, after they finalize their order, all they get is a static text showing the order number and a thank you message. It would look much more professional if you could email them a nicely formatted order confirmation message that showed them exactly what they ordered. This walkthrough shows you how to implement this enhancement.
Adding E-mail Capabilities
To add e-mailing capabilities, you’ll need to make changes at four locations. First, you need to add a static text file that serves as the template for the email. Next, you need to add a property to the AppConfiguration class that returns the location of this template file. Then you need to create three shared helper methods to format the contents of the email and to send it. The final step involves modifying code in the Business Layer to send out the mail when the order has been finalized. In the next series of steps, you learn how to accomplish these four tasks.
10
Modifying the Appointment
Booking System
The current Appointment Booking System has quite a few features that make it useful already, but it shouldn’t be hard to come up with a list of its shortcomings or enhancement requests. For example, the current application only allows appointments that start at a whole hour and that last one or more whole hours. While this is usually fine for booking objects like conference rooms and laptops, it may not be fine-grained enough for other type of booking objects. You could modify the application so the user can choose an arbitrary starting time, and an end time as well, instead of just indicating the planned duration.
Another enhancement you can make to the site is appointment validation and user feedback. Right now, after an appointment is entered in the system there is no way to see it again, cancel it, or change it. Also, the managers of the system have no option to cancel or move an appointment. It would be a useful addition if you could modify appointments in the system. Whenever an appointment is changed, the end-user could receive an e-mail with the changes and the option to accept or reject the changes.
You could also enhance the mapping between a booking object, the working days, and the hours the booking object is available. Right now, you have an all or nothing solution where you can define the start and end time for all of the working days that the booking object is available. To make this change, you need to move the start and end time columns from the BookingObject table into the junction table BookingObjectWorkingDay. This way, you attach the start and end time on the relation between the booking object and the working day, allowing you to determine the availability on a day-to-day basis.
While the previous suggestion allows you to change the start and end time for each working day, you may also have the need to change the availability for individual days. Right now, a booking object is available on one of the working days, or not. You don’t have the option to create exceptions
— for example, to keep track of the vacation an employee has taken, or for the time the booking object is in maintenance and thus not available. The following walkthrough guides you in the process of creating this exception functionality.