protected void Grid1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int i = e.RowIndex; int pid = Convert.ToInt32(Grid1.DataKeys[e.RowIndex].Values[0].ToString()); string uid = Grid1.DataKeys[e.RowIndex].Values[1].ToString(); Label lbl2 = (Label)Grid1.Rows[i].Cells[5].FindControl("lbl1"); TextBox txtlbl1 = (TextBox)Grid1.Rows[i].Cells[4].FindControl("txtlbl"); StringBuilder str = new StringBuilder(); for (int j = 0; j < Grid1.Rows.Count; j++) { GridViewRow row = Grid1.Rows[i]; //CheckBox aa = (row.FindControl("checkbox1") as CheckBox).Checked; bool isChecked = ((CheckBox)row.FindControl("checkbox1")).Checked; if (isChecked) { str.Append(Grid1.Rows[i].Cells[3].Text); } } string str1 = txtlbl1.Text; SqlCommand cmd = new SqlCommand("update Product_order set Extend_date='" + txtlbl1.Text + "'where P_id=" + pid , con); cmd.ExecuteNonQuery(); Grid1.EditIndex = -1; buildgrid(); string BID = auto_ID(); Session["back_office"] = BID; cmd = new SqlCommand("insert into Backofc_master (B_ID) values ('" + BID + "') ", con); cmd.ExecuteNonQuery(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)