Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HostObject
Message
De
28/07/2004 11:29:26
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
00928702
Message ID:
00928735
Vues:
21
Shawn,

You need to cast hostObject to your subclass to see its methods, otherwise you'll only have access to base interface methods:
this.oCompany = (Company)this.HostObject;
I don't see this explained in the help docs, so I'll forward it to Kevin as well.

Hope that makes sense,
---J

>I built a business object and i need access to a query in the busines object, from the rules validation, i think this is the right way, because i can use the query for other things as part of the business object later.
>
>The issue is how do i get the compiler not to complain when trying to use the business object via the HostObject parameter?
>
>I looked at the help and when i do the same it doesn't give me anything in intellisense, or if i had type it, it then complains on the compile that
>'object' does not contain a definition for 'CheckIfCompanyUserIdExists'
>
>I have set it up this way so i have access to it in all the code below.
>
>		//public DataSet ds;
>		public object oCompany;
>
>		public CompanyRules(ImmBusinessRuleHost hostObject) : base(hostObject)
>		{
>//Kevin's help file shows using the host object in upper case like i have typed it.
>			this.oCompany = this.HostObject;
>//  i have also tried it this way and the compiler still errors with the above error message
>//			this.oCompany = hostObject;
>		}
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform