|
 This step of the VIDEO TUTORIAL will demonstrate on how to handle the exceptions that are generated in business logic and data access layers of Data Tutorial project. In order to show case this behavior, an editable GridView control is added to the ErrorHandling.aspx page in the project. A subset of the product information that includes productName, UnitPrice, UnitsInStock and productID are displayed in the GridView’s display interface in the design mode after applying the relevant format changes. However, only name, unitprice and units in stock will be editable. To commit the changes through the editing interface of the GridView control, an overload of the Update product method that accepts four input parameters as productID, productName, UnitPrice and UnitsInStock is added to the business logic layer. For detailed information and source code for this step, please refer to the original article.
View Video...
|
|
 This step of the VIDEO TUTORIAL will demonstrate on how to handle the exceptions that are resulted in data access layer during the update process. For example, if the product name is NOT supplied, a NoNullAllowedException results. If the database is down, then a SqlException results. If the exception is not handled properly it will result in a generic default error page. In order to handle these exceptions gracefully, an exception label is added to the ErrorHandling.aspx page. In order to display the exception gracefully during the GridView1_RowUpdated event handler, the use of Exception, ExceptionHandled and KeepInEditMode properties of GridViewUpdatedEventArgs parameter of the GridView1_RowUpdated handler are utilized. Finally, the exception handling at runtime is demonstrated. For detailed information and source code for this step, please refer to the original article.
View Video...
|
|
 This step of the VIDEO TUTORIAL will show case on how to handle exceptions that happen in a business logic layer. In order to demonstrate the graceful handling of exceptions that result from violating a business rule, a business rule is added the newly created overload of the Update Product method in the ProductsBLL class file. The new business rule states that the UnitPrice must NOT be greater than twice that of an existing unit price for a product. Therefore, if a Unit Price greater than the existing unit price for particular product during the editing of the GridView control at run time, an ApplicationException is thrown in the business logic layer and is caught during the GridView’s RowUpdated event handler. For detailed information and source code for this step, please refer to the original article.
View Video...
|
|
|