Im beginner using LIST. After study the many example, so far i've have below class
}
}
For insert into the LIST, i've using
order.Add(
new ShoppingCartItem(Convert.ToInt32(Request.QueryString["trxNo"]), Request.QueryString["ordDate"],
Request.QueryString[
"id"], Request.QueryString["desc"], Convert.ToInt32(Request.QueryString["quantity"]),
Convert.ToDecimal(Request.QueryString["priceperquantity"], ,
Convert.ToDecimal(Request.QueryString["subTotal"])));
Session[
"Order"] = order; // this all value will display using GridView.
Let's say i've current LIST as follow,
TrxNo | OrdDate | ID | Quantity | PricePerQuantity | SubTotal
-------------------------------------------------------------------------------------------------
21 | 8/11/08 | 290 | 1 | 6.7 | 6.7
** ID is a unique value
My question is
1. If user choose the same item (ID=290), quantity=2 to ADD TO CART. How to update the current LIST to become as follow
TrxNo | OrdDate | ID | Quantity | PricePerQuantity | SubTotal
-------------------------------------------------------------------------------------------------
21 | 8/11/08 | 290 | 3 | 6.7 | 20.1
Im really stuck to update the LIST.