1、仓库管理系统设计报告一.系统分析1.1系统简介仓库管理信息系统是针对企业仓库货品的出入库登记和查询统计等方面工作而开发的管理软件,是一个非常实用的管理信息系统。它可以针对各个仓库的实际需要,设定不同的仓库管理系统的功能,实现物资信息的登记、入库登记、出库登记等任务。管理者可以通过相应的模块,对仓库里的物资的基本情况进行修改、删除和查询,对物资的入库和出库进行管理,对出入库的物资进行查询,并能生成相应的报表,对使用该系统的用户进行修改、添加等,查询等其他系统设计实现的管理系统能够正确有效地完成仓库管理的日常工作,并能够根据需要进行灵活的查询。系统与数据库管理系统紧密结合,为仓库管理提供了功能较为
2、强大的数据安全功能。本设计包括对目标设计、系统功能分析、系统功能模块设计析、C#语言的代码编程、输入/输出设计等。1.2 系统流程概况该系统的仓库业务主要有以下几方面:若有仓库管理人员登陆该仓库系统,则提供用户管理和密码管理。若有仓库人员调整物资的基本信息情况发生,则提供这些物资基本信息的添加,修改,查询。若有仓库人员调整物资的入库信息情况发生,则提供这些物资入库信息的添加,修改,查询。若有仓库人员调整物资的出库信息情况发生,则提供这些物资出库信息的添加,修改,查询。若仓库管理员管理有关物资库存的管理发生,则提供这些物资库存信息。结合以上的业务处理的分析,绘制的流程图如下:以上流程图主要是介绍
3、仓库管理系统的一个操作流程以及界面的一个块板。二 系统设计 为了实设计这个仓库管理系统,我们首先用的是c#语言对其进行编程,c#是.NET平台为应用开发而全新设计的一种现代编程语言,除了windows基本功能外,它在用户交互界面,web应用,数据库应用等方面功能更强,本系统设计主要运用到了面向对象编程、Windows应用程序、文件操作、数据库应用等知识。最主要以Windows应用程序为主。2.1功能的分析该系统的功能主要有:能够实现系统管理员的登陆功能,物资的基本信息添加、修改、查询,物资入库信息添加、修改、查询。物资出库信息添加、修改、查询。库存信息管理和查询。 具体的功能如下:用户进入系统
4、前的身份验证功能;记录物资规格型号、物资类别、物资计量单位等信息的功能,管理员根据需要,可以添加物资信息、删除物资信息、修改物资信息;记录入库物资规格型号、物资类别、物资计量单位等信息的功能,管理员根据需要,可以添加入库物资信息、删除入库物资信息、修改入库物资信息;记录出库物资规格型号、物资类别、物资计量单位等信息的功能,管理员根据需要,可以添加出库物资信息、删除出库物资信息、修改出库物资信息;物资库存信息管理的功能,管理员根据需要,可以对某条物资库存信息进行删除。2.2 功能模块图上图表示该系统所能实现的功能。附:由于该系统里面还有以功能用户操作功能,但是该功能都归结为权限控制这一块。所以在
5、上图中没有把该模块功能详细列入之中。2.3 代码设计2.31 代码名称模块由于系统是在microsoft visual studio 2005环境下编写,个模块代码的源代码名称如下:主界面代码:Main.cs新 建 角色: AddRoles.cs添加用户:AddUser.cs登入界面:Login.cs物资信息界面:Material.cs添加物资信息:MaterialAdd.cs修改物质信息:MaterialModify.cs查询物资信息:MaterialQuery.cs入库信息:In.cs添加入库信息:InAdd.cs修改入库信息:InModify.cs查询入库信息:InQuery.cs出库信
6、息界面:Out.cs添加出库信息:OutAdd.cs修改出库信息:OutModify.cs查询出库信息:OutQuery.cs库存信息:Store.cs查询库存信息:StoreQuery.cs修改密码界面:ModifyPassword.cs2.32 代码设计:Windows应用程序一般包括:建立项目、界面设计、属性设计、代码设计。前面介绍了前三项的步骤。现在主要是代码的设计我们以一个小模块代码为例:using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System
7、.Windows.Forms;using System.Data.OleDb;using System.Data;using System.Runtime.InteropServices;namespace StoreMIS public class Login : System.Windows.Forms.Form private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox name; private System.Windows.Forms.TextBox password; private
8、 System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private OleDbConnection sqlConnection1 =null; private OleDbCommand sqlCommand1 = null; private System.Windows.Forms.Label label1; private System.ComponentModel.Container components = null; public Login() InitializeCom
9、ponent(); this.sqlConnection1 = new OleDbConnection(StoreMIS.database.dbConnection.connection); this.sqlCommand1 = new OleDbCommand(); this.sqlCommand1.Connection = this.sqlConnection1; protected override void Dispose( bool disposing ) if( disposing ) if (components != null) components.Dispose(); ba
10、se.Dispose( disposing );#region Windows 窗体设计器生成的代码 / / 设计器支持所需的方法- 不要使用代码编辑器修改 / 此方法的内容。 private void InitializeComponent() this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.name = new System.Windows.Forms.TextBox(); this.password = new System.Windo
11、ws.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); / label2 this.label2.Font = new System.Drawing.Font(宋体, 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.G
12、raphicsUnit.Point, (byte)(134); this.label2.Location = new System.Drawing.Point(117, 78); this.label2.Name = label2; this.label2.Size = new System.Drawing.Size(56, 23); this.label2.TabIndex = 1; this.label2.Text = 用户名; / label3 this.label3.Font = new System.Drawing.Font(宋体, 10.5F, System.Drawing.Fon
13、tStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.label3.Location = new System.Drawing.Point(117, 122); this.label3.Name = label3; this.label3.Size = new System.Drawing.Size(56, 23); this.label3.TabIndex = 2; this.label3.Text = 密 码; / name this.name.BorderStyle = System.Windows.Forms
14、.BorderStyle.FixedSingle; this.name.ForeColor = System.Drawing.SystemColors.MenuHighlight; this.name.Location = new System.Drawing.Point(193, 78); this.name.Name = name; this.name.Size = new System.Drawing.Size(100, 21); this.name.TabIndex = 3; this.name.Text = admin; / password this.password.Border
15、Style = System.Windows.Forms.BorderStyle.FixedSingle; this.password.ForeColor = System.Drawing.SystemColors.MenuHighlight; this.password.Location = new System.Drawing.Point(193, 122); this.password.Name = password; this.password.PasswordChar = *; this.password.Size = new System.Drawing.Size(100, 21)
16、; this.password.TabIndex = 4; this.password.Text = admin; / button1 this.button1.BackColor = System.Drawing.Color.DarkTurquoise; this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.button1.Location = new System.Drawing.Point(108, 160); this.button1.Name = button1; this.button1.Size =
17、 new System.Drawing.Size(75, 23); this.button1.TabIndex = 5; this.button1.Text = 确定; this.button1.UseVisualStyleBackColor = false; this.button1.Click += new System.EventHandler(this.button1_Click); / button2 this.button2.BackColor = System.Drawing.Color.DarkTurquoise; this.button2.FlatStyle = System
18、.Windows.Forms.FlatStyle.Popup; this.button2.Location = new System.Drawing.Point(235, 160); this.button2.Name = button2; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 6; this.button2.Text = 取消; this.button2.UseVisualStyleBackColor = false; this.button2.Click += new Sys
19、tem.EventHandler(this.button2_Click); / label1 this.label1.BackColor = System.Drawing.Color.LightCyan; this.label1.Font = new System.Drawing.Font(Microsoft Sans Serif, 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.label1.ForeColor = System.Drawing.Color.For
20、estGreen; this.label1.Location = new System.Drawing.Point(103, 19); this.label1.Name = label1; this.label1.Size = new System.Drawing.Size(264, 40); this.label1.TabIndex = 0; this.label1.Text = 仓库管理信息系统; this.label1.Click += new System.EventHandler(this.label1_Click); / Login this.AutoScaleBaseSize =
21、 new System.Drawing.Size(7, 14); this.BackColor = System.Drawing.Color.AliceBlue; this.ClientSize = new System.Drawing.Size(412, 214); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.password); this.Controls.Add(this.name); this.Controls.Add(this.label3); thi
22、s.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Font = new System.Drawing.Font(宋体, 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = Login; this.StartPosition = System.Windows.Forms.For
23、mStartPosition.CenterScreen; this.Text = 登录; this.Load += new System.EventHandler(this.Login_Load); this.ResumeLayout(false); this.PerformLayout(); #endregion STAThread static void Main() Application.Run(new Login(); private void button1_Click(object sender, System.EventArgs e) if(name.Text.Trim()=|
24、password.Text.Trim()=) MessageBox.Show(请输入用户名和密码,提示); else sqlConnection1.Open(); OleDbCommand cmd=new OleDbCommand(,sqlConnection1); string sql=select RoleName from userinfo where UID=+name.Text.Trim()+ and PWD=+password.Text.Trim()+; cmd.CommandText=sql; string rolename; if (null!=cmd.ExecuteScala
25、r() rolename=cmd.ExecuteScalar().ToString(); /隐藏登录窗口 this.Visible=false; /创建并打开主界面 Main main=new Main(); main.Tag=this.FindForm(); sql=select * from roles where RoleName=+rolename+; OleDbDataReader dr; cmd.CommandText=sql; dr=cmd.ExecuteReader(); dr.Read(); main.menuItem1.Visible=(bool)(dr.GetValue(
26、1); main.menuItem4.Visible=(bool)(dr.GetValue(2); main.menuItem5.Visible=(bool)(dr.GetValue(3); main.menuItem6.Visible=(bool)(dr.GetValue(4)main.statusBarPanel5.Text=name.Text.Trim(); main.ShowDialog(); else MessageBox.Show(用户名或密码错误,警告); sqlConnection1.Close(); private void button2_Click(object send
27、er, System.EventArgs e) this.Close(); 程序运行得到了如下结果:三 系统功能的实现仓库管理系统是对物资的库存管理的一个体系,因此库存必定有物资的输出和输入,系统的安全性又必须要求系统做到保密的功能,不仅能够对物资的安全存储和管理,又要方便查询。对此我们这个系统将解决这些问题。系统功能的演示:仓库物资信息:添加所要入库的物资信息:包括物资编号,物资名称,物资型号,类别,单位等等信息:添加出库信息后,我们就可以进行对其查询操作,知道该物资是否已经进入库存:四 总结4.1 感想:经过几个星期的努力终于把仓库管理系统做完了,通过这次课程设计,我对数据库系统和c#语言
28、有了更深的认识和理解,知道了面向对象,还有windows应用一些程序的设计。把理论知识和实践结合起来,使理论知识得到了运用,同时自己也掌握了知识,因为是多个人共同的设计,所以我还学会了沟通及团队合作,通过自己的亲手设计,印象深刻,真正理解所学知识,通过自己亲手实践后,就会真正明白实践是检验真理的唯一标准。4.2 系统的缺陷由于自己的分析设计和经验不足,该系统设计和实现过程中,还有许多没有完善的地方,比如数据的类型没有定格好,文档和代码有的很五条理,不清晰,用户界面设计不是很美观,异常处理比较差等多方面问题,在对库存信息查询的时候有个错误未能到解决,使库存查询还未完成,这些都有待进一步完善和提高。4.3参考文献1、Visual C# 2005程序设计教程 崔淼 陈明非 主编,机械工业出版社2、Visual C#.NET程序设计教程 邱锦伦 曹昱等编著, 清华大学出版社3、C#入门经典(第3版) 美Karli Watson、Christian Nagel著 齐立波 黄静译 清华大学出版社4、5、本课程的相关讲义及教案,实例等。
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1