Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Jump Start: Web Forms Application - C#, Step 12
Message
De
25/09/2006 18:00:22
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Jump Start: Web Forms Application - C#, Step 12
Divers
Thread ID:
01157118
Message ID:
01157118
Vues:
66
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform