仓库管理信息系统报告内容摘要:

)。 =。 =。 =。 ()。 }}} catch (Exception ex){(, 操作数据库出错。 , , )。 } finally{()。 } } } 修改 密码 也需验证用户名与密码, 也 得输入两 次 密码来 确认 新 密码的正确性 , 代码如下 所示。 private void button1_Click(object sender, EventArgs e){ if (() == || () == ) (请输入原用户名和密码 , 提示 )。 else if ( != ){ (两次输入的密码密码不一样,请重新输入 , 提示 )。 =。 =。 ()。 } else { string UserName =。 string PassWord =。 string xinPassWord =。 string connString = @Data Source=pankangpc\SQLEXPRESS。 Initial Catalog=Depot。 Integrated Security = SSPI。 Persist Security Info=False。 SqlConnection connection = new SqlConnection(connString)。 string sql = (select count(*) From Users where UserName=39。 {0}39。 and PassWord=39。 {1}39。 , UserName, PassWord)。 try{()。 SqlCommand mand = new SqlCommand(sql, connection)。 int num = (int)()。 if (num 0){(密码验证成功。 , 验证成功 , , )。 sql = (UPDATE Users SET PassWord=39。 {0}39。 where UserName=39。 {1}39。 , xinPassWord, UserName)。 } else{(您输入的用户名或密码错误。 , 验证失败 , , )。 } ()。 ()。 mand = new SqlCommand(sql, connection)。 int count = ()。 if (count 0){(密码修改成功。 , 修改成功 , , )。 Main m = new Main()。 ()。 = false。 }else{(密码修改失败 , 修改失败 , , )。 }} catch (Exception ex){(, 操作数据库出错。 , , )。 } finally{()。 } } } 北京邮电大学世纪学院课程设计报告 10 物品信息 管理 模块 实现 程序流程图 用户 在 物品信息管理模块中可以选择物品入库功 能。 如果 入库的是一个新物品 则 需要填写详细的信息,包括编 号 ,名称,型号,类型,数量,进货人等信息。 如果 是 已经存在的物品 , 则只需填写编号和数量就可以了。 物品 入库流程图 如 52 所示: 图 52 物品 入库流程图 物品 信息修改 时可以在出库界面 上 查询关于这个物品的详细信息,可以 根据 编号和名称 来查询。 物品 信息修改得输入全部物品信息,物品编号必须得存在 , 物品 信息修改流程图 如 图 53所示: 图 53 物品 信息 修改流程图 N Y 已存在 物品 入 库成功 输入物品详细信息 N Y 物品入库 输入物品编号、 数量 所有 信息输入真 确 N Y 查询 物品详细信息 输入查询数据 N Y 输入物品详细信息 所有 信息输入真 确 物品信 息 修改 修改 成功 北京邮电大学世纪学院课程设计报告 11 物品 出库 时可以在出库界面 上 查询关于这个物品的详细信 息,可以 根据 编号和 名称来查询。 出库 时 只需填写物品编号,收货人编号,数量就可以了。 物品 出库 流程图 如 图54 所示: 图 54 物品 出库流程图 关键算法与技术实现 用户 在 物品信息管理模块中可以选择物品入库功能。 如果 入库的是一个新物品 则 需要填写详细的信息,包括编 号 ,名称,型号,类型,数量,进货人等信息。 如果 是 已经存在的物品 , 则只需填写编号和数量就可以了 , 物品 入库模块 部分代码 如下所示 : private void button1_Click(object sender, EventArgs e) {string bianhao =。 string name =。 string xinghao =。 string leixing =。 int shuliang = ()。 string jinhuoren =。 DateTime dt=DateTime .Now。 string time = ()。 string connString = @Data Source=pankangpc\SQLEXPRESS。 Initial Catalog=Depot。 Integrated Security = SSPI。 Persist Security Info=False。 SqlConnection connection = new SqlConnection(connString)。 string sql = (SELECT count(*) from Thing where Id=39。 {0}39。 , bianhao)。 try{()。 SqlCommand mand = new SqlCommand(sql, connection)。 int count = (int)()。 if (count 0){if (shuliang 0){sql = (UPDATE Thing SET N Y 出库 成功 输入查询数据 N Y 所有 信息输入真 确 物品出库 输入物品编号, 收货人编号,数量 插入 此物品信息 更新此 物品信息 查询 物品详细信息 出库 表中有此物品 N Y 北京邮电大学世纪学院课程设计报告 12 shuliang=shuliang+39。 {0}39。 where id=39。 {1}39。 , shuliang,bianhao )。 SqlCommand mand5 = new SqlCommand(sql, connection)。 int num4 = ()。 if (num4 0){(物品添加成功。 , 添加成功 , , )。 } else {(请输入正确的数量。 , 添加失败 , , )。 }} } else {if (() == || () == || () == || () == || () == ){ (请正确输入物品的信息。 , 提示 )。 } else{ sql = (SELECT count(*) from Jinhuo where Id=39。 {0}39。 , jinhuoren)。 SqlCommand mand2 = new SqlCommand(sql, connection)。 int num1 = (int)()。 if (num1 0){ sql = (INSERT INTO Thing (Id,name,xinghao,leibie,shuliang,jinhuoren,time) VALUES (39。 {0}39。 ,39。 {1}39。 ,39。 {2}39。 ,39。 {3}39。 ,39。 {4}39。 ,39。 {5}39。 ,39。 {6}39。 ), bianhao, name, xinghao, leixing, shuliang, jinhuoren, time)。 SqlCommand mand1 = new SqlCommand(sql, connection)。 int num = ()。 if (num 0){(物品添加成功。 , 添加成功 , , )。 } else{(物品添加失败。 , 添加失败 , , )。 }} else{(不存在此进货人,请重新 输入。 , 添加失败 , , )。 }} }} catch (Exception ex){ (, 操作数据库出错。 , , )。 } finally{ ()。 }} 物品 信息修改 时 可以在出库界面 上 查询关于这个物品的详细信息,可以 根据 编号和名称 来查询。 物品 信息修改得输入全部物品信息,物品编号必须得存在 , 物品 信息修改模块 部分代码 如下所示 : private void button1_Click(object sender, EventArgs e){ if (() == || () == || () == || () == || () == ){ (请正确输入物品的信息。 , 提示 )。 } else{string bianhao =。 string name =。 string xinghao =。 string leixing =。 string shuliang =。 string connString = @Data Source=pankangpc\SQLEXPRESS。 Initial Catalog=Depot。 Integrated Security = SSPI。 Persist Security Info=False。 SqlConnection connection = new SqlConnection(connString)。 string sql = (UPDATE Thing SET name=39。 {0}39。 ,xinghao=39。 {1}39。 ,leibie=39。 {2}39。 ,shuliang=39。 {3}39。 where Id=39。 {4}39。 , name, xinghao, leixing, shuliang,bianhao)。 try{ ()。 SqlCommand mand = new SqlCommand(sql, connection)。 北京邮电大学世纪学院课程设计报告 13 int count = ()。 if (count 0){ (物品信息修改成功。 , 修改成功 , , )。 =。 =。 =。 =。 =。 } else{ (物品信息修改失败。 , 修改 失败 , , )。 } } catch (Exception ex){(, 操作数据库出错。 , , )。 } finally{()。 }} } 物品 出库 时可以在出库界面 上 查询关于这个物品的详细信息,可以 根据 编号和 名称来查询。 出库 时 只需填写物。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。