为什么我的update更新不了啊
求大家解答 卡几个小时了
int rowindex = dataGridView1.CurrentRow.Index;
string[] value = new string[13];
value[0] = "0";
for (int i = 1; i < 13; i++)
{
value[i] = dataGridView1.Rows[rowin
dex].Cells[i].Value.ToString();
}
int strid2 = Convert.ToInt32(dataGridVie
w1.CurrentRow.Index);
string sql = string.Format(@"update Emp
loyee set EmployeeName='{0}',EmployeeSex='{1}',EmployeeIDCard={2},EmployeeBirth='{3}',EmployeeHire='{4}',EmployeeTitle='{5}',EmployeeDepartment='{6}',EmployeePaid='{7}',EmployeeAddress='{8}',EmployeePostalCode='{9}',EmployeeIphone='{10}',EmployeeRemarks='{11}'wher e EmployeeID ='{12}'"
, value[1], value[2], Convert.ToInt32(value[3]), value[4], value[5], value[6], value[7], value[8], value[9], value[10], value[11], value[12], strid2);
int n = DBHelper.ExecuteNonQuery(sql);
if (n > 0)
{
MessageBox.Show("修改成功");
}
else
{
MessageBox.Show("修改失败");
}
```