Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MmBusiness.ForeignParentKeyField property?
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00891427
Message ID:
00892818
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform