(完整版)小型超市收银系统的设计与实现毕业设计论文

SqlParameter myNorm = new

SqlParameter(\ myNorm.Value = tempGoods.GoodsNorm; myCmd.Parameters.Add(myNorm);

SqlParameter myPrice = new

SqlParameter(\ myPrice.Value = tempGoods.GoodsSellPrice; myCmd.Parameters.Add(myPrice);

SqlParameter myAlarm = new SqlParameter(\ myAlarm.Value = tempGoods.AlarmNum; myCmd.Parameters.Add(myAlarm);

SqlParameter myRemark = new

SqlParameter(\ myRemark.Value = tempGoods.GoodsRemark; myCmd.Parameters.Add(myRemark); 执行存储过程 try {

msqlCon.Open();

myCmd.ExecuteNonQuery(); return true;

} catch {

return false; } finally {

msqlCon.Close(); } }

修改商品基本信息

public bool UpdateGoods(GoodsDetails tempGoods) {

this.msqlCon = new SqlConnection(mstrCon);

SqlCommand myCmd = new SqlCommand(\msqlCon);

myCmdmandType = CommandType.StoredProcedure; 给存储过程添加参数

SqlParameter myID = new SqlParameter(\SqlDbType.NVarChar, 20);

myID.Value =tempGoods.GoodsId; myCmd.Parameters.Add(myID);

SqlParameter myName=new

SqlParameter(\

myName.Value=tempGoods.GoodsName; myCmd.Parameters.Add(myName);

SqlParameter myType=new

SqlParameter(\ myType.Value=tempGoods.TypeName; myCmd.Parameters.Add(myType);

SqlParameter myUnit=new

SqlParameter(\ myUnit.Value=tempGoods.GoodsUnit; myCmd.Parameters.Add(myUnit);

SqlParameter myNorm=new

SqlParameter(\ myNorm.Value=tempGoods.GoodsNorm; myCmd.Parameters.Add(myNorm);

SqlParameter myPrice=new

SqlParameter(\ myPrice.Value=tempGoods.GoodsSellPrice; myCmd.Parameters.Add(myPrice);

SqlParameter myAlarm=new SqlParameter(\

myAlarm.Value=tempGoods.AlarmNum; myCmd.Parameters.Add(myAlarm);

SqlParameter myRemark=new

SqlParameter(\ myRemark.Value=tempGoods.GoodsRemark; myCmd.Parameters.Add(myRemark); 执行存储过程 try {

msqlCon.Open();

myCmd.ExecuteNonQuery(); return true; } catch {

return false; } finally {

msqlCon.Close(); } }

删除商品基本信息

public bool DeleteGoods(string tempGoodsID)

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4