仓储物资管理系统数据库课程设计Word文档下载推荐.docx
- 文档编号:20615058
- 上传时间:2023-01-24
- 格式:DOCX
- 页数:24
- 大小:370.21KB
仓储物资管理系统数据库课程设计Word文档下载推荐.docx
《仓储物资管理系统数据库课程设计Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《仓储物资管理系统数据库课程设计Word文档下载推荐.docx(24页珍藏版)》请在冰豆网上搜索。
(1)界面设计要求尽量友好、美观,应提供登录界面,并考虑用户权限问题;
(2)对各种信息应提供录入、修改、删除和查询功能;
(3)具有对商品的基本信息和流动信息进行统计的功能;
(4)具有数据备份与恢复、帮助等功能;
(5)能够新增、修改和删除用户信息;
2.1.2运行环境
Windows98/2000/XP/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()
{InitializeComponent();
}
privatevoidBUT_Y_Click(objectsender,EventArgse)
{stringusername=tbuser.Text;
stringpassword=tbpw.Text;
stringconnstring=@"
DataSource=.zhaojuan-PC\SQLEXPRESS;
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(comboBox1.Text=="
超级管理员"
&
tbuser.Text=="
admin"
)
{conn.Open();
SqlCommandcomm=newSqlCommand(sql,conn);
intnum=(int)comm.ExecuteScalar();
if(num>
0)
{this.Hide();
Fmmenuf1=newFmmenu();
f1.ShowDialog();
else
{MessageBox.Show("
用户名或密码或身份错误,请重新输入!
"
登录失败"
MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}}
elseif(comboBox1.Text=="
普通管理员"
{conn.Open();
f1.删改信息ToolStripMenuItem.Enabled=false;
{MessageBox.Show("
}}
else{
MessageBox.Show("
catch(Exceptioneee)
{MessageBox.Show(eee.Message,"
数据库操作错误!
finally
{conn.Close();
privatevoidBUT_z_Click(objectsender,EventArgse)
{Fmregisterf2=newFmregister();
f2.ShowDialog();
5.2注册界面与代码
privatevoidbutton1_Click(objectsender,EventArgse)
{if(tbpw.Text==tB2_repw.Text)
{stringconnstring=@"
;
try
SqlCommandcomm=newSqlCommand("
register"
conn);
comm.CommandType=CommandType.StoredProcedure;
comm.Parameters.AddWithValue("
@username"
tbuser.Text.Trim());
@password"
tbpw.Text.Trim());
comm.Parameters.AddWithValue("
@workerID"
tB_worker.Text.Trim());
intcount=comm.ExecuteNonQuery();
//执行命令,返回的行数
if(count>
0){
MessageBox.Show("
注册成功!
可以登录!
"
成功"
MessageBoxButtons.OK,MessageBoxIcon.Information);
else
注册失败!
错误!
MessageBoxButtons.OK,MessageBoxIcon.Information);
catch(Exception)
操作数据失败!
可能用户名重复或您不是本公司职员!
finally
}}
重复密码错误!
privatevoidbut_return_Click(objectsender,EventArgse)
{this.Close();
}
5.3修改密码
privatevoidbut_Y_Click(objectsender,EventArgse)
{if(tBsure.Text==tBNpass.Text)
DataSource=zhaojuan-PC\SQLEXPRESS;
AttachDbFilename=D:
IntegratedSecurity=True"
SqlCommandcomm=newSqlCommand("
updatepass"
comm.CommandType=CommandType.StoredProcedure;
tBuser.Text);
tBpass.Text);
@newpass"
tBNpass.Text);
修改密码成功"
);
tBuser.Text="
tBpass.Text="
tBNpass.Text="
tBsure.Text="
tBuser.Focus();
数据库操作失败"
修改密码失败"
catch
{conn.Close();
确认密码与新密码不符"
tBsure.Text="
privatevoidbutton1_Click(objectsender,EventArgse)
{this.Close();
5.4系统主界面设计和代码
publicpartialclassFmmenu:
{publicFmmenu()
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:
{publicallinformation()
{InitializeComponent();
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.Exceptionex)
{System.Windows.Forms.MessageBox.Show(ex.Message);
try
{this.workerTableAdapter.FillBy1(this.wMS_DBDataSet1.Worker);
{this.view_putoutTableAdapter.FillBy(this.wMS_DBDataSet4.View_putout);
{this.supplierTableAdapter.FillBy(this.wMS_DBDataSet2.Supplier);
{this.view_putinTableAdapter.FillBy(this.wMS_DBDataSet3.view_putin);
}}}
5.6添加信息查询界面设计
根据上图可知添加信息分为三类,人员信心,仓库信息,和商品信息,此外,人员信息分为职工类和供货商类,因添加界面和代码,格式大抵相同,所以只展示部分界面,进入添加设计如下:
1.添加商品信息
publicpartialclassputin_G:
{publicputin_G()
privatevoidbut_Y_Click(objectsender,EventArgse)
{stringconnstring=@"
insertgoods"
@goods_ID"
tB1_G_ID.Text.Trim());
@goods_name"
tB2_G_name.Text.Trim());
@goods_price"
tB3_G_price.Text.Trim());
@minnum"
tB5_G_minnum.Text.Trim());
intcount=comm.Exe
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 仓储 物资 管理 系统 数据库 课程设计