Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stack overflow in Web Forms Jump Start plus sample reque
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00934239
Message ID:
00935588
Vues:
24
Steven,

You should have two overloads of GetOrderDetail in your business object...one that accepts a parameter of type int(as specified in step 6):
public DataSet GetOrderDetail(int orderID)
{
	return this.GetDataSet("SELECT * FROM [Order Details] WHERE OrderID = " + 
				orderID);
}
And a second overload that accepts a parameter of type object (as specified in step 7):
public DataSet GetOrderDetail(object orderID)
{
	if (orderID != null)
	{
		return this.GetOrderDetail((int)orderID);
	}
	else
	{
		return this.GetEmptyDataSet();
	}
}
If you didn't add the first overload as specified in step 6, this would create a recursive call situation.

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