临时存储信息
Code
DataTable dtuserselect;
if (Session["user_select"] == null)
{
dtuserselect = new DataTable();
dtuserselect.Columns.Add(new DataColumn("name", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("type", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("sdate", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("tbh", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("tparentid", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("zxtype", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("xxbh", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("isdy", typeof(string)));
Session["user_select"] = dtuserselect;
}
else
{
dtuserselect = (DataTable)Session["user_select"];
}
DataRow dr = dtuserselect.NewRow();
object[] rowVals;
rowVals[0] =;
rowVals[1] = ;
rowVals[2] = ;
rowVals[3] = ;
rowVals[4] = ;
rowVals[5] = ;
rowVals[6] = ;
dtuserselect.Rows.Add(rowVals);
DataTable dtuserselect;
if (Session["user_select"] == null)
{
dtuserselect = new DataTable();
dtuserselect.Columns.Add(new DataColumn("name", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("type", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("sdate", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("tbh", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("tparentid", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("zxtype", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("xxbh", typeof(string)));
dtuserselect.Columns.Add(new DataColumn("isdy", typeof(string)));
Session["user_select"] = dtuserselect;
}
else
{
dtuserselect = (DataTable)Session["user_select"];
}
DataRow dr = dtuserselect.NewRow();
object[] rowVals;
rowVals[0] =;
rowVals[1] = ;
rowVals[2] = ;
rowVals[3] = ;
rowVals[4] = ;
rowVals[5] = ;
rowVals[6] = ;
dtuserselect.Rows.Add(rowVals);