Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference to the business object from businessrule objec
Message
De
03/03/2004 12:11:45
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
03/03/2004 03:31:54
Filip Bruman
Kirschberg Holding
Copenhagen, Denmark
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00882006
Message ID:
00882770
Vues:
19
Filip,

Maybe I'm misunderstanding, but I thought you were looking for a way, from inside the rules object, to access the related business object?

If so, HostObject stores a reference to the object that instantiated the mmBusinessRule object (look at mmBusinessRule's constructor). This object implements the ImmBusinessRuleHost interface, and is of either mmBusinessObject or mmBusinessEvent type.

In your case, when your business object instantiates its rules object, it can then access the HostObject field to get a reference to the business object:
//This code would be in your rules class.
YourBizObj YBO = this.HostObject;

//You should have intellisense now...
YBO.YourCustomMethod();
Hope that clears the issue up a little,
---J

>Hello J,
>
>Could you please elaborate on what to do with the mmBusinessRules' HostObject?
>The GetBusinessRuleObject method returns a reference to the _BusinessRuleObject_ not the BusinessRules' related BusinessObject, as the return type of GetBusinessRuleObject method is mmBusinessRule or have I understood this all wrong?
>
>Regards
>
>-Filip
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform