
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: CLIENT/SERVER SYSTEMS; Subject: Information Technology; University: Armstrong Atlantic State University; Term: Unknown 1989;
Typology: Study notes
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Business errors: constraint errors business rules: Example: max salary raise is 7%, email addresses are correct .NET exception classes: Debug > Exceptions Creating error classes for the Northwind application: MaximumLengthException (pg 164) and ZeroLengthException (pg 165) – zero length strings should not be stored in the database. These exceptions are used to report errors for region description and for other fields stored into the database. Errors are reported from the business tier to the user tier through structErrors (pg 165) and through a collection of structErrors (pg 165) called BusinessErrors.
Add a collection of errors to RegionDC (pg 166) and add to this collection if the user tries to set a zero length or a too big region description (pg 167) Self documenting object: add a list of errors that can occur in RegionDC : GetBusinessRules (pg 168) Change RegionDC.Save to return the list of errors and to access the DB only if there were no errors when setting the object properties (pg 170)
BrokenRules class is used to keep track of several violations so that they are all reported to the user. Simple constraints errors are reported (pg 172) In the Region class (UC object) we include a BrokenRules object that keeps track of all constraints violations. When we create an empty region, constraints are violated because the region description is empty (pg 174) Add duplicate checks for constrains errors in the UC object (Region), and the set property for region description (pg 176)
Create a frmBusinessRules object that displays a list of field-rule pairs (pg 186) and add a btnRules button to frmEditBase (pg 184) that displays the list (pg 185, pg 183)
Add an ErrorProvider object to the frmEditBase (pg 187) and respond to the user changing the regionDescription by displaying an error if the string is invalid (190) Handle Edit cancellations in frmEditBase (pg 192)