This process will demonstrate how to create a data entry and update form that will work with your tested business object.
The Region business object should be complete and fully tested.
This is just the way it works.
The theory is that the work we have done up until now has two advantages. The first advantage has already shown itself: we have an easy to use methodology that delivers robust, tested business objects in a predictable amount of time. All of that is rather moot however, if the process fails to simplify the construction of user interface objects. Let's take a look at what is not here and why it is not here.
First, we have stored procedures handling much of the work of database updates and retrievals. That saves us from having to write SQL code on the fly, eliminates it from the user interface, and avoids problems like SQL injection attacks. Second, all of that data table mapping, connection string, and command procedure code created by the data adapter wizard has bee cleaned up, organized, tested, and will not have to be dealt with here. Third, all of that code in our dataset class is working for us in a way that simplifies rather than bulks up our Web forms. Fourth, the business object class manages and hides the complexities of the various operations to update the database, often imposing business rules as it does so. The interface programmer does not need to be concerned with any of those details, but simply needs to know how to get or update information using the business object class. Finally, we will see there are far more advantages than convenience to the UI programmer; flexibility, reliability, and maintainability are the real reasons Microsoft's Best Practices team and almost every other software engineering organization in the world recommend an architecture that is multi-tiered and object-oriented.
One of the complexities of building Web forms is postbacks. PostBacks happen every time that you click on a Web button or use a data control that has its autoPostBack property set to true. PostBacks reload the whole page so you often need to make provisions so that information persists between PostBacks. We don't need to do anything on this form because all of the information is automatically maintained by the viewstate.
Previous Step: Run NUnit
Next Step: Create an Admin Home Page