Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More rules questions
Message
From
07/08/2003 12:00:07
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
06/08/2003 18:09:04
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00816291
Message ID:
00817789
Views:
12
Brian,

Not exactly following you here, so take this with a grain of salt if it's not exactly what you were looking for...

My example encapsulated the code in a rules object... "ClientBizRules" because your original question related to validating a field in Client against one in Contacts.

However, if you find you have a set of rules that apply across multiple BizObjs, I suggest setting up a separate BizRules object and an interface those BizObjs implement for calling the rules.

We're doing just that for payment method validation. We have several objects that store how a customer is paying for product (default customer payment info, order payment info, authorization payment info, etc.), each needing to know how to validate this information. We can either wait until saving a record to do all the validation, or instantiate PaymentInfoBizRules and call the specific methods we need for the situation at hand.

Hope that solves your dilemma,
---J

>J,
>I’m a bit confused. Shouldn’t I add this to the rules object so that it is encapsulated and reusable in other BizObjects that may need the same rule. If that’s the case would I just get a reference to the rule in the BizObject and fire the function ie llReturnFlg=oClient.oRule.CheckStuff(some fk)?
>
>Thanks
>Brian G
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform