日期:2014-05-17 浏览次数:20473 次
for (int j= 0; j< gridview.Rows.Count; j++)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
double kc_c = Convert.ToDouble(dt.Rows[i][4].ToString());
string sqlstr = "update Storage_kc set Quantity='" + (Convert.ToDouble(TextBox9.Text.Trim().ToString()) + kc_c) + "'where GoodsName='" + gridview.Rows[j].cell[2].ToString()+ "'and UnitPrice='" + gridview.Rows[j].cell[4].ToString()+ "'and Provider='" + gridview.Rows[j].cell[5].ToString(+ "'";/
SqlCommand sqlcom = new SqlCommand(sqlstr, connn);
connn.Open();
sqlcom.ExecuteNonQuery();
connn.Close();
}
}?