Compiling BO's

Compiling BO's

Old forum URL: forums.lhotka.net/forums/t/847.aspx


PaulinNY posted on Tuesday, August 08, 2006

Hi. Just a quick question. Should I be compiling my derived business objects in the same assembly as the framework? The reason I ask is that I'm having a problem seeing Friend properties from the point of view of a different assembly. ie. I'm trying to access members of a collection that are derived from business base and business collection base, respectively but exist in their own assembly. I would like to implement deferred deletion. However  I don't see a way to access the methods in either the collection or the members to have them flagged as deleted, removed from the collection and added to the deleteditems list. I'm trying hard not to hack a public method.

Thanks

dean replied on Tuesday, August 08, 2006

You generally will keep the framework in a different assembly. Property/methods marked friend in the framework mean you should not be accessing them (as your instinct indicated).

To use deferred deletion use the remove method on the collection class. You can see an example of this in the ProjectResources code from Project Tracker.

Dean

PaulinNY replied on Wednesday, August 09, 2006

Thanks for the reply Dean. I realized from looking at the sample code that the issue was that my collection derives from collectionbase rather than bindablecollectionbase. I wasn't getting an OnRemove event. It appears that this event is the only way to get an object on the deleted list.  Is there a way to do this without the event?

 

Thanks again

ajj3085 replied on Wednesday, August 09, 2006

You should actually be subclassing from BusinessListBase.  I think that will handle the remove of the object from the list for you.

Copyright (c) Marimer LLC