protected void btnAdd_Click(object sender, EventArgs e) { int count = 0; DataTable myTable = new DataTable(); myTable = CreateDataTable(); if (Convert.ToInt32(Session["Count"]) != 0) myTable = (DataTable)Session["myDatatable"]; // tot = Convert.ToInt32(tot) + 12wConvert.ToInt32(txtAmt.Text); DataRow row; row = myTable.NewRow(); count = myTable.Rows.Count + 1; row["Size"] = cmbSize.SelectedItem.Text; row["SizeID"] = cmbSize.SelectedValue; row["Rate"] = Convert.ToInt64(txtRate.Text); row["Noofcopies"] = txtNoofcopies.Text; row["Total"] = txtTotal.Text; myTable.Rows.Add(row); Session["Count"] = Convert.ToInt32(Session["Count"]) + count; Session["myDatatable"] = myTable; //lblTotal.Text = Convert.ToString(tot); Grid(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)