按关键词阅读: 系统 管理 代码 仓库
/ 声明 DataCon 类的一个对象 ,以调用其方法#region 绑定 ComboBox 控件/ / 对 ComboBox 控件进行数据绑定/ / SQL 语句 / 表名 / 数据表中字段名 / ComboBox 控件 ID public void cboxBind(string M_str_sqlstr, string M_str_table, string M_str_tbMember, 。
13、 ComboBox cbox)DataSet myds = datacon.getds(M_str_sqlstr, M_str_table);
cbox.DataSource = myds.TablesM_str_table;
cbox.DisplayMember = M_str_tbMember;
/ 显示 username 字段#endregion#region 验证文本框输入为数字/ / 验证文本框输入为数字/ / 输入字符 / 返回一个 bool 类型的值 public bool validateNum(string M_str_num) return Regex.lsMatch(M_str 。
14、_ num, 0-9*$);
#endregion#region 验证文本框输入为电话号码/ / 验证文本框输入为电话号码/ / 输入字符串 / 返回一个 bool 类型的值 public bool validatePhone(string M_str_phone) return Regex.IsMatch(M_str_phone, d3,4-d7,8);
#endregion#region 验证文本框输入为传真号码/ / 验证文本框输入为传真号码/ / 输入字符串 / 返回一个 bool 类型的值 public bool validateFax(string M_str_fax)return。
15、Regex.IsMatch(M_str_fax, 86-d2,3-d7,8);
#endregion#region 用户登录/ / 用户登录/ / 用户名 / 用户密码 / 返回一个 int 类型的值 public int UserLogin(string P_str_UserName, string P_str_UserPwd)SqlConnection sqlcon = datacon.getcon();
SqlCommand sqlcom = new SqlCommand(proc_Login, sqlcon);
sqlcom.CommandType = CommandType.StoredP 。
16、rocedure;
sqlcom.Parameters.Add(UserName, SqlDbType.VarChar, 20).Value =https://www.renrendoc.com/paper/P_str_UserName;
sqlcom.Parameters.Add(UserPwd, SqlDbType.VarChar, 20).Value = https://www.renrendoc.com/paper/P_str_UserPwd;
SqlParameter returnValue = https://www.renrendoc.com/paper/sqlcom.Parameters.Add(returnValue, SqlDbType.Int, 4);
returnValue.Direction = ParameterDirection.ReturnValue;
/ 返 。
17、回值?sqlcon.Open();
trysqlcom.ExecuteNonQuery();
catch (Exception ex)MessageBox.Show(ex.Message);
finallysqlcom.Dispose();
sqlcon.Close();
sqlcon.Dispose();
int P_int_returnValue = https://www.renrendoc.com/paper/(int)returnValue.V alue;
return P_int_returnValue;
#endregion#region 货物入库/ / 货物入库/ / 货物编号 / 货物名称 / 供应商名称 / 仓库名称 / 货物规格 / 计量单位 / 进 。
18、货数量 / 货物单价 / 经手 / 备注 / 返回一个 int 类型的值 public int InsertGoods(int P_int_GoodsID,string P_str_GoodsName,stringP_str_PrName,string P_str_StoreName,string P_str_GoodsSpec,string P_str_GoodsUnit,intP_int_GoodsNum,decimal P_dml_GoodsPrice,string P_str_HPeople,string P_str_Remark)SqlConnection sqlcon = data 。
19、con.getcon();
SqlCommand sqlcom = new SqlCommand(proc_insertInStore, sqlcon);
sqlcom.CommandType = CommandType.StoredProcedure;
sqlcom.Parameters.Add(GoodsID, SqlDbType.BigInt).Value =https://www.renrendoc.com/paper/P_int_GoodsID;
sqlcom.Parameters.Add(GoodsName, SqlDbType.VarChar, 50).Value =https://www.renrendoc.com/paper/P_str_GoodsName;
sqlcom.Parameters.Add(PrN 。
20、ame, SqlDbType.VarChar, 100).Value =https://www.renrendoc.com/paper/P_str_PrName;
sqlcom.Parameters.Add(StoreName, SqlDbType.VarChar, 100).Value =https://www.renrendoc.com/paper/P_str_StoreName;
sqlcom.Parameters.Add(GoodsSpec, SqlDbType.VarChar, 50).Value =https://www.renrendoc.com/paper/P_str_GoodsSpec;
sqlcom.Parameters.Add(GoodsUnit, SqlDbType.Char, 8).Value =https://www.renrendoc.com/paper/P_str_GoodsUnit;
sqlcom.Parameters 。
21、.Add(GoodsNum, SqlDbType.BigInt).Value =https://www.renrendoc.com/paper/P_int_GoodsNum;
sqlcom.Parameters.Add(GoodsPrice, SqlDbType.Money).Value =https://www.renrendoc.com/paper/P_dml_GoodsPrice;
sqlcom.Parameters.Add(HandlePeople, SqlDbType.VarChar, 20).V alue =P_str_HPeople;
sqlcom.Parameters.Add(ISRemark, SqlDbType.VarChar, 1000).Value =https://www.renrendoc.com/paper/P_str_Remark;
SqlParameter 。
22、 returnValue = https://www.renrendoc.com/paper/sqlcom.Parameters.Add(returnValue,trysqlcom.ExecuteNonQuery();
catch (Exception ex)MessageBox.Show(ex.Message);
finallysqlcom.Dispose();
sqlcon.Close();
sqlcon.Dispose();
int P_int_returnValue = https://www.renrendoc.com/paper/(int)returnValue.V alue;
return P_int_returnValue;
#endregion#region 添加供应商信息/ / 添加供应商信息/ / 供应商名称。
23、/ 负责 / 供应商联系电话 / 供应商传真号码 / 备注 / 返回一个 int 类型的值 public int InsertProvider(string P_str_PrName, string P_str_PrPeople, string P_str_PrPhone, string P_str_PrFax, string P_int_PrRemark)SqlConnection sqlcon = datacon.getcon();
SqlCommand sqlcom = new SqlCommand(proc_insertProvider, sqlcon);
sqlcom.CommandTy 。
24、pe = CommandType.StoredProcedure;
sqlcom.Parameters.Add(PrName, SqlDbType.VarChar, 100).Value =https://www.renrendoc.com/paper/P_str_PrName;
稿源:(未知)
【傻大方】网址:/a/2021/0816/0023746446.html
标题:仓库|仓库管理系统代码( 二 )