﻿ dataGridView.Rows[i].Cells[3].Value 的值如何转换为整数进行加法运算 | Code Bye

# dataGridView.Rows[i].Cells[3].Value 的值如何转换为整数进行加法运算

7年前 (2015-05-10) 631次浏览
 ```sql = " insert into plankDetail3L (批号,明细号,材料名,高,宽,厚,块数) values(""" +                                strOrderId + """," +                               dataGridView3.Rows[i].Cells[1].Value + ",""" +                               dataGridView3.Rows[i].Cells[2].Value + """," +                               Convert.ToInt32(dataGridView3.Rows[i].Cells[3].Value) + intHeight + "," +                               Convert.ToInt32(dataGridView3.Rows[i].Cells[4].Value) + intWidth + "," +                               Convert.ToInt32(dataGridView3.Rows[i].Cells[5].Value) + intDeep + "," +                               Convert.ToInt32(dataGridView3.Rows[i].Cells[6].Value) + ")";                             OBJcmdUpdate3 = new OleDbCommand(sql, sqlConn);                             OBJcmdUpdate3.ExecuteNonQuery();``` 引用  insert into plankDetail3L (批号,明细号,材料名,高,宽,厚,块数) values(“”1500401″”,1,””踢脚板1″”,00,00,00,0) Convert.ToInt32 40分 (Convert.ToInt32(dataGridView3.Rows[i].Cells[4].Value) + intWidth) 用括号包含下 楼上的对，没注意啊 用Convert.toint32(要转换的内容）这个方法

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明dataGridView.Rows[i].Cells[3].Value 的值如何转换为整数进行加法运算

[1034331897@qq.com]