protected void btnConf_Click(object sender, EventArgs e) { adpOrd.UpdateDelivery(delGet, orderGet); opdb = adpOP.GetOP(orderGet); int sid; int quant; decimal price; int buyID; int prodID; foreach (var row in opdb) { sid = row.SellerID; quant = row.Quantity; price = row.ProdPrice; buyID = row.BuyerID; prodID = row.ProdID; decimal total = (decimal)adpOP.ScalarGetPriceBySeller(sid, orderGet, prodID, buyID); adpOP.UpdatePriceStat("Pending", total, prodID, orderGet, sid, buyID); } decimal oTotal = (decimal)adpOP.ScalarTotalByOrder(orderGet); foreach (var row in opdb) { sid = row.SellerID; quant = row.Quantity; price = row.ProdPrice; buyID = row.BuyerID; prodID = row.ProdID; adpOP.UpdatePriceStt(oTotal, prodID, orderGet, sid, buyID); } lblMsg.Text = "Order Confirmed"; Response.Redirect("~/Buyer/thankYou.aspx"); }