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

2026/4/30 4:25:48

{

this.msqlCon = new SqlConnection(mstrCon);

SqlCommand myCmd = new SqlCommand(\msqlCon);

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

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

myID.Value = tempGoodsID; myCmd.Parameters.Add(myID); 执行存储过程 try {

msqlCon.Open();

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

return false; } finally {

msqlCon.Close(); }

}

判断是否存在商品

public bool HasGoods(string tempGoodsID) {

this.msqlCon = new SqlConnection(mstrCon);

SqlCommand myCmd = new SqlCommand(\msqlCon);

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

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

myID.Value = tempGoodsID; myCmd.Parameters.Add(myID);

SqlParameter flag = new SqlParameter(\ParameterDirection.Output;

myCmd.Parameters.Add(flag); try {

msqlCon.Open();

myCmd.ExecuteNonQuery();

return (Convert.ToBoolean(flag.Value)); } catch {

return false; } finally {

msqlCon.Close(); } }

判断某供应商是否提供某商品

public bool IsSupplyGds(string tempCmp,string tempGoodsID) {

this.msqlCon = new SqlConnection(mstrCon);

SqlCommand myCmd = new SqlCommand(\msqlCon);

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

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

myID.Value = tempGoodsID; myCmd.Parameters.Add(myID);

SqlParameter myCmp=new

SqlParameter(\ myCmp.Value=tempCmp; myCmd.Parameters.Add(myCmp);

SqlParameter myflag=new SqlParameter(\

myflag.Direction = ParameterDirection.Output; myCmd.Parameters.Add(myflag); 执行存储过程 try {

msqlCon.Open();

myCmd.ExecuteNonQuery();

return Convert.ToBoolean(myflag.Value); } catch {

return false; } finally {

msqlCon.Close(); } } 增加库存

public bool AddStock(string tempStockID,string

tempGoodsID,string tempCmp,string tempOperator,float tempPrice,int tempNum,string tempRemark,int tempflag) {


(完整版)小型超市收银系统的设计与实现毕业设计论文.doc 将本文的Word文档下载到电脑
搜索更多关于: (完整版)小型超市收银系统的设计与实现毕业设计论文 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219