>I tried to override PopulateForeignParentKeyField method in our top level sub business class like this.
>
>foreach (string ParentKeyField in _ForeignParentKeyFields) {
> base.PopulateKeyField(ParentKeyField, whereIsTheKeyFieldValue);
>}
>
>And now, we have got new problem about KeyFields values. How can we get every key fields value?
You could do something like this:
protected virtual void PopulateForeignParentKeyField()
{
for (int i=0, i < this.ForeignParentKeyFields.Length; i++)
{
if (ForeignParentKeyFields[i] != null && this.ParentKeyValues[i] != null)
{
this.PopulateKeyField(this.ForeignParentKeyFields[i], this.ParentKeyValues[i]);
}
}
}
The ForeignParentKeyFields array is set at design time, and the ParentKeyValues array is automatically set by the Framework when handling a state change event.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com