Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More rules questions
Message
From
04/08/2003 11:01:15
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
03/08/2003 10:55:03
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00816291
Message ID:
00816502
Views:
23
Brian,
In your ClientBizRules object, create a method (IsContactsYValueValid), in which ContactsBizObj is instantiated and its IsYPopulated() method is called:
public bool IsContactsYValueValid(int FK)

bool RetVal = true;

//Maybe want to make this a static field of ClientBizRules instead of hard-coding?
if (FK == 1)
{
   ContactsBizObj ContactObj = new ContactsBizObj();

   //This method pulls up contact record matching FK value.
   if (ContactObj.IsYPopulated(FK) == false)
   {
      RetVal = false;
      this.AddBrokenRule("Field Y required!");
   }
}

return RetVal;
Now, you can add a call to IsContactsYValueValid() in ClientBizRules.CheckRules(), passing in the current DataRow's value of the FK field. Also, since IsContactsYValueValid is public, you can also call it directly to validate before attempting a SaveDataSet()... maybe from the UI.

Hope that helps,
---J


>This may be another stupid question, I have bizOject Client . If the FK in field A is a specific value say “1” then field Y in a Contacts BizOject is required.
>How do I implement that with the BizRules? I understatnd how to implement the rules that work against the tables in a single BizObject but what about the rules that span multiple BizObjects?
>
>Any Help would be greatly appreciated.
>
>Thanks
> Brian G
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform