Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event objects and related business objects
Message
De
13/12/1999 16:51:22
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00302631
Message ID:
00302992
Vues:
27
>>>>Kevin,
>>>>
>>>>When using an Event object, I need to include two business objects that are related to each other (ie in a One to Many relation). Is there any way to do this short of adding these objects to the form and overriding the DefineParticipatingEntities method?
>>>>
>>>>TIA
>>>>
>>>>Rex
>>>
>>> PMFJI - There shouldn't be any reason you need to add the objects to the form. You can just define them in the DefineParticipatingEntities() method of your event and it will automatically instanciate them for you. Once it's done they'll disappear.
>>>
>>>-Paul
>>
>>Paul,
>>
>>What about relating business objects to each other and to existing objects?
>>I'm not sure it is possible in code.
>>
>>What do you think?
>>
>>Rex
>
> Ah. I see what you're trying to do. I assumed you had already set-up the relation in the class before instancing it. I haven't tried that but couldn't you pass the "parent" bizobj first in DefineParticipatingEntities() then your child object, then in the ExecuteEvent() method place the reference to the parent object in the child. The code would look something like:
>
>DefineParticipatingEntities()
>------------------------------
>This.Add("Project", "ProjectsObj") && Parent
>This.Add("Staff", "StaffObj") && Child
>
>
>ExecuteEvent()
>------------------------------
>LOCAL loProject, loStaff
>
>loProject = THIS.Get("Project")
>loStaff = THIS.Get("Staff")
>
>loStaff.cParentBizObj = "Project"
>
>* Set any other parent/child properties like lNewChildOnNewParent, etc.
>
>* Continue on with the rest of the processing
>
>
>
> Maybe Kevin will jump in and clear this up.


Paul,

I don't think so. I think the cParent needs to be set before instantiation since there are linking properties for each bizobj.

Hope I hear from Kevin soon.

Thanks

Rex
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform