I have an array that is in C# using the .Net framwork and I have the code to delete items from the array, but I am trying to figure out how to update an item in the array.
Kind Regards,
-Tsubasa
Code:
public DataSet GetDataSetCar()
{
if (Session["car"] == null)
{
DataSet ds = new DataSet();
DataColumn colID = new DataColumn("ID_Product", System.Type.GetType("System.Int32"), "");
DataTable dt = new DataTable("Car");
dt.Columns.Add(colID);
dt.Columns.Add("Name_Product", System.Type.GetType("System.String"), "");
dt.Columns.Add("Quantity", System.Type.GetType("System.Int32"), "");
dt.Columns.Add("Value", System.Type.GetType("System.Double"), "");
dt.Columns.Add("SubTotal", System.Type.GetType("System.Double"), "Quantity*Value");
dt.Columns.Add("Total", System.Type.GetType("System.Double"), "SUM(SubTotal)");
//key field
DataColumn[] keys = new DataColumn[1];
keys[0] = colID;
dt.PrimaryKey = keys;
ds.Tables.Add(dt);
Session["car"] = ds;
return ds;
}
else
{
return (Session["car"] as DataSet);
}
}
-Tsubasa