Hi Gerald,
I'd tend to be more modular. I.e. I'd likely have methods to enforce each of these rules and have each rule in the BO it is associated with. Then in the OnCheckRulesCurrentRow method, I'd call each of these rules. The reason is to decouple the data from the U.I. It also is better encapsulation, as each BO implements its own rules. By putting Child rules in the parent, you'd break this rule (but then sometimes ya just need to break the rules...so nothing is set in stone). This means that even if you edit the child data independent of the parent data, it's rules are still enforced. In other words I'd think of the this as a collection of rules, rather than one monolithic "rule". Also note that the checking of data validity of the child items when the parent customer value changes isn't really happening at the same time as other validity checks (in OnCheckRulesCurrentRow); it is happening when the parent field changes.
All Business Objects have a ParentBusinessObject property. For this to work, you need to setup a parent relationship on the BO itself. Then on
instances of a BO, you can set the ParentBusinessObject to an
instance of the parent BO. There is also a ChildBusinessObjects property of a BusinessObject. If there is only one child BO, then this is easy, it's the item. This gets set when the ParentBusinessObject is set on a child. So, assuming you have both the parent BO and the Child BO on the form, and that you've configured the child BO's ParentRelationship and then set the ParentBusinessObject on the child instance on the form to the parent BO instance on the form, then:
'-- From within parent BO, access Child BO (assume only one child)
Dim childBO As MyChildBO = DirectCast(Me.ChildBusinessObjects(0), MyChildBO)
'-- From within the child BO, access the parent BO
Dim parentBO As MyParentBO = DirectCast(Me.ParentBusinessObject, MyParentBO)
Note that this code is in the BOs, but the ParentBusinessObject is set on the instance dropped on the form.
Another approach would be to create a custom property on the parent for this specific type of child and program against that.
Another long post. I hope it helps!