Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to deal with error on update?
Message
 
 
To
15/03/2010 10:34:29
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01454304
Message ID:
01454539
Views:
26
In your case 1) what is typically the base class for Biz class? And do you instantiate this Biz class in the constructor of the UI form? Thank you.

>There are many, many, many ways to handle business rules and validation of those rules. Here are two simplified suggestions, based on what you said you wanted to do:
>
>1) You could have a business class in between your UI and your DAL. So when your UI calls a Save method, it calls it on the Biz class, not the DataAccess class. The Biz Save() method will check that the appropriate required fields contain data and pass back the error if not. If everything properly validates, then the Biz class passes the Save call on to the DataAccess class's Save method.
>
>2) You could skip the Biz layer for now and write a partial class for your DataSet. In that partial class you could have a method called CheckRules() or something similar that will do your validation.
>
>There are lots of more complicated scenarios, but these two suggestions are relatively simple and should get you started.
>
>~~Bonnie
>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform