Trent L. Taylor (04/30/2009)
However, to do what you are wanting, just create another BO that inherits the BO with the custom events if that is an option.Thanks to both of you for your replies... helps the learning process.
So basically for situations like this (which in the application I'm building will be needed for most of the mainline BOs) the process would be something like this.
1.) Create a business object and map to a datasource via BOM. Set the advanced properties in the BOM to generate any dynamic business object events I want. Let's call this one boFirst.
2.) Create a second business object in the usual fashion (but don't BOM it). Instead, change its base class to boFirst. This will provide this second business object (let's call it boSecond) with all of the strongly types columns created via the BOM process performed on boFirst, plus the dynamic events found in the partial class for boFirst.
Seems reasonable and a good solution.
Assuming the above is correct, two follow-up questions.
1.) After doing the above, I see the strongly typed columns and the generated dynamic events in boSecond. When I go into the BOM I see boSecond, but it has a red X on it as it is looking to be configured to a data source. I am assuming I just let it sit like that and do not actually configure it? That being the case I assume over time I'll have some "first line" BOs that are fully configured in the BO, and a bunch of "second line" BOs that have red Xs in them. Hmmmm... ?
2.) Are any time-saving techniques I can use to replace boFirst with boSecond on any forms I've already created and for which many controls are bound. Obviously I can do the brute force approach and rebind, or I can rename the instance of boSecond I'll drop on the forms to boFirst (but that might irk me a bit as it may be misleading). No biggie if there's not a way... it's still all good, although it makes me wonder if there's value in
always doing the above two steps just in case there's a similar need in the future.
Thanks!
________________
_____/ Regards,
____/ al