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

上传人:b****5 文档编号:14941217 上传时间:2023-06-28 格式:DOCX 页数:30 大小:372.44KB
下载 相关 举报
仓储物资管理系统数据库课程设计.docx_第1页
第1页 / 共30页
仓储物资管理系统数据库课程设计.docx_第2页
第2页 / 共30页
仓储物资管理系统数据库课程设计.docx_第3页
第3页 / 共30页
仓储物资管理系统数据库课程设计.docx_第4页
第4页 / 共30页
仓储物资管理系统数据库课程设计.docx_第5页
第5页 / 共30页
仓储物资管理系统数据库课程设计.docx_第6页
第6页 / 共30页
仓储物资管理系统数据库课程设计.docx_第7页
第7页 / 共30页
仓储物资管理系统数据库课程设计.docx_第8页
第8页 / 共30页
仓储物资管理系统数据库课程设计.docx_第9页
第9页 / 共30页
仓储物资管理系统数据库课程设计.docx_第10页
第10页 / 共30页
仓储物资管理系统数据库课程设计.docx_第11页
第11页 / 共30页
仓储物资管理系统数据库课程设计.docx_第12页
第12页 / 共30页
仓储物资管理系统数据库课程设计.docx_第13页
第13页 / 共30页
仓储物资管理系统数据库课程设计.docx_第14页
第14页 / 共30页
仓储物资管理系统数据库课程设计.docx_第15页
第15页 / 共30页
仓储物资管理系统数据库课程设计.docx_第16页
第16页 / 共30页
仓储物资管理系统数据库课程设计.docx_第17页
第17页 / 共30页
仓储物资管理系统数据库课程设计.docx_第18页
第18页 / 共30页
仓储物资管理系统数据库课程设计.docx_第19页
第19页 / 共30页
仓储物资管理系统数据库课程设计.docx_第20页
第20页 / 共30页
亲,该文档总共30页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

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

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

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

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

成绩

 

11信计2013-2014

(一)

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

 

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

设计时间 2013。

12。

31—-—2014。

1.4

学生姓名 张政伟

学生学号 20110402124

所在班级 11精算

指导教师 董晓玮

 

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

 

 

1可行性研究

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

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

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

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

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

2需求分析

2.1任务概述

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

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

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

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

用户可以随时进行各种查询、统计、报表打印、账目核对等工作.另外,也可以用图表形式来反映查询结果。

2.1.1目标

(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();

SqlCommandcomm=newSqlCommand(sql,conn);

intnum=(int)comm。

ExecuteScalar();

if(num>0)

{this。

Hide();

Fmmenuf1=newFmmenu();

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

f1.ShowDialog();}

else

{MessageBox。

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

","登录失败”,MessageBoxButtons。

OK,MessageBoxIcon.Exclamation);}}

else{

MessageBox。

Show(”用户名或密码或身份错误,请重新输入!

”,"登录失败",MessageBoxButtons。

OK,MessageBoxIcon。

Exclamation);}}

catch(Exceptioneee)

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

”,MessageBoxButtons。

OK,MessageBoxIcon。

Exclamation);}

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=@"DataSource=。

zhaojuan—PC\SQLEXPRESS;AttachDbFilename=F:

\仓库管理系统\仓库管理系统\WMS_DB。

mdf;IntegratedSecurity=True;ConnectTimeout=30;UserInstance=True";

SqlConnectionconn=newSqlConnection(connstring);;

try

{conn。

Open();

SqlCommandcomm=newSqlCommand("register",conn);

comm。

CommandType=CommandType。

StoredProcedure;

comm.Parameters。

AddWithValue(”@username”,tbuser.Text。

Trim());

comm.Parameters.AddWithValue(”@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

{MessageBox.Show("注册失败!

","错误!

",MessageBoxButtons.OK,MessageBoxIcon.Information);}}

catch(Exception)

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

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

","错误!

",MessageBoxButtons.OK,MessageBoxIcon。

Information);}

finally

{conn。

Close();}}

else

MessageBox。

Show("注册失败!

重复密码错误!

",”错误!

",MessageBoxButtons。

OK,MessageBoxIcon。

Information);}

privatevoidbut_return_Click(objectsender,EventArgse)

{this。

Close();}

5.3修改密码

privatevoidbut_Y_Click(objectsender,EventArgse)

{if(tBsure。

Text==tBNpass。

Text)

{stringconnstring=@”DataSource=zhaojuan-PC\SQLEXPRESS;AttachDbFilename=D:

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

SqlConnectionconn=newSqlConnection(connstring);

try

{conn.Open();

SqlCommandcomm=newSqlCommand("updatepass",conn);

comm.CommandType=CommandType。

StoredProcedure;

comm.Parameters。

AddWithValue("@username",tBuser.Text);

comm。

Parameters.AddWithValue("@password”,tBpass。

Text);

comm。

Parameters。

AddWithValue("@newpass",tBNpass.Text);

intcount=comm。

ExecuteNonQuery();

if(count>0)

{MessageBox.Show(”修改密码成功");

tBuser.Text=”";tBpass。

Text=”";tBNpass.Text="";tBsure.Text=”";tBuser。

Focus();}

else

{MessageBox.Show(”数据库操作失败”,"修改密码失败”,MessageBoxButtons。

OK,MessageBoxIcon。

Exclamation);}}

catch

{MessageBox。

Show("操作数据失败!

”,"错误!

",MessageBoxButtons。

OK,MessageBoxIcon.Information);}

finally

{conn.Close();}}

else

{MessageBox.Show(”确认密码与新密码不符","修改密码失败",MessageBoxButtons。

OK,MessageBoxIcon。

Exclamation);

tBuser。

Text=””;tBpass。

Text="";tBNpass.Text="”;tBsure。

Text="";tBuser.Focus();}}

privatevoidbutton1_Click(objectsender,EventArgse)

{this.Close();}

5。

4系统主界面设计和代码

publicpartialclassFmmenu:

Form

{publicFmmenu()

{InitializeComponent();}

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()

{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);}

catch(System。

Exceptionex)

{System.Windows。

Forms.MessageBox。

Show(ex。

Message);}

try

{this。

view_putoutTableAdapter.FillBy(this。

wMS_DBDataSet4。

View_putout);}

catch(System。

Exceptionex)

{System。

Windows。

Forms。

MessageBox.Show(ex.Message);}

try

{this。

supplierTableAdapter。

FillBy(this。

wMS_DBDataSet2。

Supplier);}

catch(System.Exceptionex)

{System.Windows。

Forms。

MessageBox。

Show(ex。

Message);}

try

{this。

view_putinTableAdapter。

FillBy(this.wMS_DBDataSet3。

view_putin);}

catch(System。

Exceptionex)

{System.Windows。

Forms.MessageBox。

Show(ex.Message);}}}

5。

6添加信息查询界面设计

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

 

1.添加商品信息

publicpartialclassputin_G:

Form

{publicputin_G()

{InitializeComponent();}

privatevoidbut_Y_Click(objectsender,EventArgse)

{stringconnstring=@"DataSource=。

zhaojuan—PC\SQLEXPRESS;AttachDbFilename=F:

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

SqlConnectionconn=newSqlConnection(connstring);

try

{conn.Open();

SqlCommandcomm=newSqlCommand("insertgoods",conn);

comm.CommandType=CommandType.StoredProcedure;

comm。

Parameters.AddWithValue(”@goods_ID”,tB1_G_ID.Text。

Trim());

comm。

Parameters。

AddWithValue(”@goods_name”,tB2_G_name。

Text.Trim());

comm.Parameters。

AddWithValue("@goods_price",tB3_G_price.Text.Trim());

comm.Parameters.AddWithValue(”@minnum”,tB5_G_minnum。

Text.Trim());

intcount=comm。

ExecuteNon

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

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2