hi
according below code:
protected void ImgorderL_Click(object sender, EventArgs e)
{
ImageButton ibtn = sender as ImageButton;
int id = Convert.ToInt32(Request.QueryString["Id"].ToString());
DataTable dtFiles = GetFilmInfo(id);
string Name = dtFiles.Rows[0][1].ToString();
string MKVE = dtFiles.Rows[0][37].ToString();
string DVDE = dtFiles.Rows[0][38].ToString();
string PostMkvPr = dtFiles.Rows[0][12].ToString();
string PostDvdPr = dtFiles.Rows[0][13].ToString();
string Code = dtFiles.Rows[0][4].ToString();
string Type = dtFiles.Rows[0][36].ToString();
string SectionName = dtFiles.Rows[0][3].ToString();
DataTable dt = new DataTable();
if (Session["Order"] != null)
{
dt = Session["Order"] as DataTable;
}
else
{
dt.Columns.AddRange(new DataColumn[] { new DataColumn("Id",typeof(int)),new DataColumn("Name",typeof(string)),new DataColumn("Quality",typeof(string)),
new DataColumn("PriceT", typeof(decimal)), new DataColumn("Price", typeof(decimal)), new DataColumn("Quanyity", typeof(int)),new DataColumn("code",typeof(string)),new DataColumn("Type",typeof(string)),new DataColumn("SectionName",typeof(string)),
new DataColumn("Buy",typeof(string)),new DataColumn("show",typeof(string)), });
}
dt.Rows.Add(dt.Rows.Count + 1, Name, "MKV", PostDvdPr, PostDvdPr, DVDE, Code, Type, SectionName, "لینک دانلود", "download");
int totalOrder = dt.AsEnumerable().Sum(row => row.Field<int>("Quanyity"));
Lblorder.Text = totalOrder.ToString();
Response.Cookies["UserName"].Value = Lblorder.Text.Trim();
Session["Order"] = dt;
}
here I save some data from database into session["Order"]
now I create table in database that I want save some data from session["Order"] into this table...
below is table:
now I want save Code,name,type from sesstion["Order"] into this table
How I can do it?
Best regards
Neda