Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying Broken Business Rules
Message
 
À
05/04/2004 11:09:30
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00892281
Message ID:
00892461
Vues:
18
Steve,

>Is there a preferred way inside the framework to display broken business rules in a web app?

There is...if you check out the Dev Guide section "Integrating Business Objects with a Web Form", it shows that you can call the web form's Save() method like this:
private void btnSave_Click(object sender, System.EventArgs e)
{
	//  Retrieve the original DataSet from the Session variable
	DataSet dsOrder = (DataSet)Session["dsOrder"];

	// Call the Web Form's Save method, passing the business object and the original data.
	// The business object raises a Saving event and all bound Web controls
	// bind their data back into the DataSet
	if (this.Save(this.oOrder, dsOrder, this.oOrder.TableName) ==
		mmSaveDataResult.RulesPassed)
	{
		Response.Redirect("CustomerOrders.aspx");
	}
}
If there are any broken rules, these are automatically displayed for you. You can also call the mmBusinessWebPage's DisplayBrokenRules() method directly.

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