Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Jump Start: Web Forms Application - C#, Step 12
Message
From
25/09/2006 18:00:22
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Jump Start: Web Forms Application - C#, Step 12
Miscellaneous
Thread ID:
01157118
Message ID:
01157118
Views:
65
I am going through the above jump start and I am not sure if there is a typo at Step 12 - 4.:

Should this:
 // Retrieve the specified order and detail
   this.oOrderDetail.GetOrderDetail(this.OrderID);
   Session["dsOrderDetail"] = this.oOrderDetail.DataSet;

   Session["dsOrder"] = this.oOrder.DataSet;
   Session["dsOrderDetail"] = this.oOrderDetail.GetOrderDetail(this.OrderID);
Which did not retrieve the order.

Instead be:
        // Retrieve the specified order and detail
        this.oOrder.GetOrderByOrderID(this.OrderID);
        Session["dsOrder"] = this.oOrder.DataSet;
     
        this.oOrderDetail.GetOrderDetail(this.OrderID);
        Session["dsOrderDetail"] = this.oOrderDetail.DataSet;
Which retrieves the order but I am getting an error during save.

Is this correct for Step 12 - 7.?
/// <summary>
/// Save the Order header data
/// </summary>
private void btnSave_Click(object sender, System.EventArgs e)
{
   DataSet dsOrder = (DataSet)Session["dsOrder"];

   if (this.Save(this.oOrder, dsOrder, this.oOrder.TableName) ==
      mmSaveDataResult.RulesPassed)
   {
      Response.Redirect("CustomerOrders.aspx");
   }
}
Please advise, Ted
Next
Reply
Map
View

Click here to load this message in the networking platform