仓储物资管理系统数据库课程设计报告.docx

上传人:b****8 文档编号:11046370 上传时间:2023-02-24 格式:DOCX 页数:26 大小:237.30KB
下载 相关 举报
仓储物资管理系统数据库课程设计报告.docx_第1页
第1页 / 共26页
仓储物资管理系统数据库课程设计报告.docx_第2页
第2页 / 共26页
仓储物资管理系统数据库课程设计报告.docx_第3页
第3页 / 共26页
仓储物资管理系统数据库课程设计报告.docx_第4页
第4页 / 共26页
仓储物资管理系统数据库课程设计报告.docx_第5页
第5页 / 共26页
点击查看更多>>
下载资源
资源描述

仓储物资管理系统数据库课程设计报告.docx

《仓储物资管理系统数据库课程设计报告.docx》由会员分享,可在线阅读,更多相关《仓储物资管理系统数据库课程设计报告.docx(26页珍藏版)》请在冰豆网上搜索。

仓储物资管理系统数据库课程设计报告.docx

仓储物资管理系统数据库课程设计报告

成绩

11信计2021-2021〔一〕

"数据库原理及应用"课程设计

设计题目 仓储物资管理系统

设计时间 2021.12.31---2021.1.4

学生** 政伟

学生** 

所在班级 11精算

指导教师 董晓玮

工程学院数学与物理科学学院

1可行性研究

仓库管理系统是为了实现企业产品管理的系统化、规化和自动化,从而提高企业管理效率而设计的。

它完全取代了原来一直用人工管理的工作方式,防止了由于管理人员的工作疏忽以及管理质量问题所造成的各种错误,为及时、准确、高效的完成仓库管理提供了强有力的工具和管理手段。

仓库管理系统是一个中小型数据库管理系统,它界面美观、操作简单、平安性高,根本满足了仓库管理的要求。

本系统的开发语言采用的是C*,开发环境采用的是Visualstudio2021,数据库采用SQLServer2005,具有一般系统的数据功能,如数据查询,修改和删除等。

仓库管理系统在运行阶段,效果好,数据准确性高,提高了工作效率,同时也实现了仓库管理计算机化。

2需求分析

2.1任务概述

经过调查,对仓库管理的业务流程进展分析。

库存的变化通常是通过入库、出库操作来进展。

系统对每个入库操作均要求用户填写入库单,对每个出库操作均要求用户填写出库单。

在出入库操作同时可以进展增加、删除和修改等操作。

用户可以随时进展各种查询、统计、报表打印、账目核对等工作。

另外,也可以用图表形式来反映查询结果。

目标

〔1〕界面设计要求尽量友好、美观,应提供登录界面,并考虑用户权限问题;

〔2〕对各种信息应提供录入、修改、删除和查询功能;

〔3〕具有对商品的根本信息和流动信息进展统计的功能;

〔4〕具有数据备份与恢复、帮助等功能;

〔5〕能够新增、修改和删除用户信息;

2.1.2运行环境

Windows98/2000/*P/2003操作系统下,安装并配置软件MicrosoftSQLServer2000数据库管理系统。

2.2数据需求

2.2.1数据流条目

根据我们的进展的调查和分析,系统中各种功能所需的数据项和数据构造如下:

①商品信息:

商品编号,商品名,商品单价;

②职工信息:

职工号,职工**,性别,,住址;

③供货商信息:

供应商**,地址,,单位等;

④入库信息:

入库编号,商品编号,商品名称,单价,数量,总价,供应商;

⑧出库信息:

出库编号,商品编号,商品名称,单价,数量,总价,经手人;

2.2.2数据库描述

使用SQLSERVER2000作为后台数据库,就可以行使基于网络连接的用户认证。

从而给不同的子系统分配不同的数据库使用角色,让他们彼此之间使用的数据库隔离开来,以到达较高的平安性。

2.3功能需求

根据对各大超市进展的调查和分析,仓库管理系统应该具有以下功能:

①仓库中的货物信息的录入、修改、删除和查询。

②仓库的信息的的录入、修改、删除、查询和统计。

③管理者的信息的录入、修改、删除和查询。

④供货商的信息的录入、修改、删除、查询和统计。

⑤货物流动信息的录入、修改、删除和查询。

2.3.1功能划分

仓库管理系统主要实现以下四方面的功能:

A.登陆

b.注册

c.查询

d.修改

2.3.2功能描述

仓库管理包括登陆、注册、查询、修改四方面功能。

登陆,分为普通管理员登陆和超级管理员登陆。

查询,分为员工查询,仓库查询和物品查询。

修改,主要实现添加,修改和删除。

3概要设计

对系统功能分析中的各项功能进展集中、分块,按照构造化程序设计的要求,得到如以下图所示的系统功能模块图。

员工查询

仓库查询

商品查询

注册

仓库管理系统

登录

普通管理员

超级管理员

查询

修改

添加

修改

删除

4逻辑设计

根据数据库需求分析,本系统的数据库逻辑构造设计如下。

①商品信息设计

②入库单信息设计

3 出库单信息设计

④职工信息设计

⑤仓库信息设计

⑥供货商信息表

5界面设计和代码

5.1登陆界面设计

publicpartialclassFmlogin:

Form

{publicFmlogin()

{Initializeponent();}

privatevoidBUT_Y_Click(objectsender,EventArgse)

{stringusername=tbuser.Te*t;

stringpassword=tbpw.Te*t;

stringconnstring="DataSource=.zhaojuan-PC\SQLE*PRESS;AttachDbFilename=F:

\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True;ConnectTimeout=30;UserInstance=True";

SqlConnectionconn=newSqlConnection(connstring);//获取用户名和密码匹配的行的数量的sql语句

stringsql=string.Format("selectcount(*)from[usertable]whereusername='{0}'andpassword='{1}'",username,password);

try

{if(boBo*1.Te*t=="超级管理员"&&tbuser.Te*t=="admin")

{conn.Open();

Sqlmandm=newSqlmand(sql,conn);

intnum=(int)m.E*ecuteScalar();

if(num>0)

{this.Hide();

Fmmenuf1=newFmmenu();

f1.ShowDialog();}

else

{MessageBo*.Show("用户名或密码或身份错误,请重新输入!

","登录失败",MessageBo*Buttons.OK,MessageBo*Icon.E*clamation);}}

elseif(boBo*1.Te*t=="普通管理员")

{conn.Open();

Sqlmandm=newSqlmand(sql,conn);

intnum=(int)m.E*ecuteScalar();

if(num>0)

{this.Hide();

Fmmenuf1=newFmmenu();

f1.删改信息ToolStripMenuItem.Enabled=false;

f1.ShowDialog();}

else

{MessageBo*.Show("用户名或密码或身份错误,请重新输入!

","登录失败",MessageBo*Buttons.OK,MessageBo*Icon.E*clamation);}}

else{

MessageBo*.Show("用户名或密码或身份错误,请重新输入!

","登录失败",MessageBo*Buttons.OK,MessageBo*Icon.E*clamation);}}

catch(E*ceptioneee)

{MessageBo*.Show(eee.Message,"数据库操作错误!

",MessageBo*Buttons.OK,MessageBo*Icon.E*clamation);}

finally

{conn.Close();}}

privatevoidBUT_z_Click(objectsender,EventArgse)

{Fmregisterf2=newFmregister();f2.ShowDialog();}}

5.2注册界面与代码

privatevoidbutton1_Click(objectsender,EventArgse)

{if(tbpw.Te*t==tB2_repw.Te*t)

{stringconnstring="DataSource=.zhaojuan-PC\SQLE*PRESS;AttachDbFilename=F:

\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True;ConnectTimeout=30;UserInstance=True";

SqlConnectionconn=newSqlConnection(connstring);;

try

{conn.Open();

Sqlmandm=newSqlmand("register",conn);

m.mandType=mandType.StoredProcedure;

m.Parameters.AddWithValue("username",tbuser.Te*t.Trim());

m.Parameters.AddWithValue("password",tbpw.Te*t.Trim());

m.Parameters.AddWithValue("workerID",tB_worker.Te*t.Trim());

intcount=m.E*ecuteNonQuery();//执行命令,返回的行数

if(count>0){

MessageBo*.Show("注册成功!

可以登录!

","成功",MessageBo*Buttons.OK,MessageBo*Icon.Information);}

else

{MessageBo*.Show("注册失败!

","错误!

",MessageBo*Buttons.OK,MessageBo*Icon.Information);}}

catch(E*ception)

{MessageBo*.Show("操作数据失败!

可能用户名重复或您不是本公司职员!

","错误!

",MessageBo*Buttons.OK,MessageBo*Icon.Information);}

finally

{conn.Close();}}

else

MessageBo*.Show("注册失败!

重复密码错误!

","错误!

",MessageBo*Buttons.OK,MessageBo*Icon.Information);}

privatevoidbut_return_Click(objectsender,EventArgse)

{this.Close();}

5.3修改密码

privatevoidbut_Y_Click(objectsender,EventArgse)

{if(tBsure.Te*t==tBNpass.Te*t)

{stringconnstring="DataSource=zhaojuan-PC\SQLE*PRESS;AttachDbFilename=D:

\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True";

SqlConnectionconn=newSqlConnection(connstring);

try

{conn.Open();

Sqlmandm=newSqlmand("updatepass",conn);

m.mandType=mandType.StoredProcedure;

m.Parameters.AddWithValue("username",tBuser.Te*t);

m.Parameters.AddWithValue("password",tBpass.Te*t);

m.Parameters.AddWithValue("newpass",tBNpass.Te*t);

intcount=m.E*ecuteNonQuery();

if(count>0)

{MessageBo*.Show("修改密码成功");

tBuser.Te*t=";tBpass.Te*t=";tBNpass.Te*t=";tBsure.Te*t=";tBuser.Focus();}

else

{MessageBo*.Show("数据库操作失败","修改密码失败",MessageBo*Buttons.OK,MessageBo*Icon.E*clamation);}}

catch

{MessageBo*.Show("操作数据失败!

","错误!

",MessageBo*Buttons.OK,MessageBo*Icon.Information);}

finally

{conn.Close();}}

else

{MessageBo*.Show("确认密码与新密码不符","修改密码失败",MessageBo*Buttons.OK,MessageBo*Icon.E*clamation);

tBuser.Te*t=";tBpass.Te*t=";tBNpass.Te*t=";tBsure.Te*t=";tBuser.Focus();}}

privatevoidbutton1_Click(objectsender,EventArgse)

{this.Close();}

5.4系统主界面设计和代码

publicpartialclassFmmenu:

Form

{publicFmmenu()

{Initializeponent();}

privatevoid职员ToolStripMenuItem_Click(objectsender,EventArgse)

{putinto_ww=newputinto_w();

w.ShowDialog();}

privatevoid查询所有ToolStripMenuItem_Click(objectsender,EventArgse)

{allinformations=newallinformation();

s.ShowDialog();}

privatevoid按仓库ToolStripMenuItem_Click(objectsender,EventArgse)

{BY_WHIDbw=newBY_WHID();

bw.ShowDialog();}

privatevoid供货商ToolStripMenuItem_Click(objectsender,EventArgse)

{putinto_supsu=newputinto_sup();su.ShowDialog();}

privatevoid仓库信息ToolStripMenuItem_Click(objectsender,EventArgse)

{putinto_WHwh=newputinto_WH();wh.ShowDialog();}

privatevoid商品信息ToolStripMenuItem_Click(objectsender,EventArgse)

{putin_Gg=newputin_G();g.ShowDialog();}

privatevoid入库ToolStripMenuItem_Click(objectsender,EventArgse)

{putinpi=newputin();pi.ShowDialog();}

privatevoid出库ToolStripMenuItem_Click(objectsender,EventArgse)

{putoutpo=newputout();po.ShowDialog();}

privatevoid删改信息ToolStripMenuItem_Click(objectsender,EventArgse)

{updataANDdeleteud=newupdataANDdelete();ud.ShowDialog();}

privatevoid提醒ToolStripMenuItem_Click(objectsender,EventArgse)

{remindre=newremind();re.ShowDialog();}

privatevoid修改密码ToolStripMenuItem_Click(objectsender,EventArgse)

{updatapassup=newupdatapass();up.ShowDialog();}

privatevoid关于ToolStripMenuItem_Click(objectsender,EventArgse)

{Aboutab=newAbout();ab.ShowDialog();}

privatevoid按供货商ToolStripMenuItem_Click(objectsender,EventArgse)

{BY_SUPbs=newBY_SUP();bs.ShowDialog();}}

5.5查询信息管理界面设计

publicpartialclassallinformation:

Form

{publicallinformation()

{Initializeponent();}

privatevoidallinformation_Load(objectsender,EventArgse)

{this.view_putoutTableAdapter.Fill(this.wMS_DBDataSet4.View_putout);

this.view_putinTableAdapter.Fill(this.wMS_DBDataSet3.view_putin);

this.supplierTableAdapter.Fill(this.wMS_DBDataSet2.Supplier);

this.workerTableAdapter.Fill(this.wMS_DBDataSet1.Worker);

this.gOODSTableAdapter.Fill(this.wMS_DBDataSet.GOODS);}

privatevoidfillByToolStripButton_Click(objectsender,EventArgse)

{try

{this.gOODSTableAdapter.FillBy(this.wMS_DBDataSet.GOODS);}

catch(System.E*ceptione*)

{System.Windows.Forms.MessageBo*.Show(e*.Message);}

try

{this.workerTableAdapter.FillBy1(this.wMS_DBDataSet1.Worker);}

catch(System.E*ceptione*)

{System.Windows.Forms.MessageBo*.Show(e*.Message);}

try

{this.view_putoutTableAdapter.FillBy(this.wMS_DBDataSet4.View_putout);}

catch(System.E*ceptione*)

{System.Windows.Forms.MessageBo*.Show(e*.Message);}

try

{this.supplierTableAdapter.FillBy(this.wMS_DBDataSet2.Supplier);}

catch(System.E*ceptione*)

{System.Windows.Forms.MessageBo*.Show(e*.Message);}

try

{this.view_putinTableAdapter.FillBy(this.wMS_DBDataSet3.view_putin);}

catch(System.E*ceptione*)

{System.Windows.Forms.MessageBo*.Show(e*.Message);}}}

5.6添加信息查询界面设计

根据上图可知添加信息分为三类,人员信心,仓库信息,和商品信息,此外,人员信息分为职工类和供货商类,因添加界面和代码,格式大抵一样,所以只展示局部界面,进入添加设计如下:

1.添加商品信息

publicpartialclassputin_G:

Form

{publicputin_G()

{Initializeponent();}

privatevoidbut_Y_Click(objectsender,EventArgse)

{stringconnstring="DataSource=.zhaojuan-PC\SQLE*PRESS;AttachDbFilename=F:

\仓库管理系统\仓库管理系统\WMS_DB.mdf;IntegratedSecurity=True;ConnectTimeout=30;UserInstance=True";

SqlConnectionconn=newSqlConnection(connstring);

try

{conn.Open();

Sqlmandm=newSqlmand("insertgoods",conn);

m.mandType=mandType.StoredProcedure;

m.Parameters.AddWithValue("goods_ID",tB1_G_ID.Te*t.Trim());

m.Parameters.AddWithValue("goods_name",tB2_G_name.Te*t.Trim());

m.Parameters.AddWithValue("goods_price",tB3_G_price.Te*t.Trim());

m.Parameters.AddWithValue("minnum",tB5_G_minnum.Te*t.Trim());

intcount=m.E*ecuteNonQuery();//执行命令,返回的行数

if(count>0)

{MessageBo*.Show("添加成功!

","成功",MessageBo*Buttons.OK,MessageBo*Icon.Information);}

else

{MessageBo*.Show("添加失败!

","错误!

",MessageBo*Buttons.OK,MessageBo*Icon.Information);}}

catch(E*ception)

{MessageBo*.Show("操作数据失败!

可能商品已存在!

","错误!

",MessageBo*Buttons.OK,MessageBo*Icon.Information);}

f

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 外语学习 > 英语考试

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1