就是没有修改 直接运行的 提示 我错误 说的是 system.data.sqlclient.sqlexception:","附近有语法错误
在tb_jhgoodsinfomenthod.cs
#region 添加
public int tb_JhGoodsInfoMenthodAdd(tb_JhGoodsInfo tbGood)
{
int intFalg = 0;
try
{
//string str_Add = "insert into tb_JhGoodsInfo values( ";
//str_Add += "'" + tbGood.strGoodsID + "','" + tbGood.strEmpId + "','" + tbGood.strJhCompName + "',";
//str_Add += "'" + tbGood.strDepotName + "','" + tbGood.strGoodsName + "','" + tbGood.strGoodsNum + "',";
//str_Add += "'" + tbGood.strGoodsUnit + "','" + tbGood.deGoodsJhPrice + "','" + tbGood.deGoodsSellPrice + "',";
//str_Add += "'" + tbGood.deGoodsNeedPrice + "','" + tbGood.deGoodsNoPrice + "','" + tbGood.strGoodsRemark + "',";
//str_Add += "'" + tbGood.Falg + "')";
string str_Add = "insert into tb_JhGoodsInfo values( ";
str_Add += "'" + tbGood.strGoodsID + "','" + tbGood.strEmpId + "','" + tbGood.strJhCompName + "',";
str_Add += "'" + tbGood.strDepotName + "','" + tbGood.strGoodsName + "','" + tbGood.strGoodsNum + "',";
str_Add += "'" + tbGood.strGoodsUnit + "'," + tbGood.deGoodsJhPrice + " ," + tbGood.deGoodsSellPrice + " ,";
str_Add += "" + tbGood.deGoodsNeedPrice + "," + tbGood.deGoodsNoPrice + ",'" + tbGood.strGoodsRemark + "',";
str_Add += "'" + tbGood.DaGoodTime + "'," + tbGood.Falg + ")";
getSqlConnection getConnection = new getSqlConnection();
conn = getConnection.GetCon();
cmd = new SqlCommand(str_Add, conn);
intFalg = cmd.ExecuteNonQuery();
conn.Dispose();
return intFalg;
}
catch (Exception ee)
{
MessageBox.Show(ee.ToString());
return intFalg;
}
}
#endregion
不知道是哪个地方错了