• 仓库物资管理系统(C#+SQL)


    目 录
    摘要………………………………………………………………………………………………1
    一 绪论………………………………………………………………………………………1

    1. 1管理信息系统的概述…………………………………………………………………………………1
    2. 2数据库应用系统开发简介…………………………………………………………………………2
    3. 3物资管理系统…………………………………………………………………………………………2
      1.3.1国内外同类管理软件的研究现状与发展趋势……………………………………………2
      1.3.2物资管理系统研究背景与意义………………………………………………………………2
      二 物资管理系统设计分析…………………………………………………………3
      2.1需求分析…………………………………………………………………………………………………3
      2.2模块划分…………………………………………………………………………………………………4
      三 数据库设计…………………………………………………………………………4
      3.1 设计的数据项和数据结构如下…………………………………………………………4
      3.2 数据库概念结构设计……………………………………………………………………………5
      3.3数据库逻辑结构设计………………………………………………………………………………7
      3.4 数据库和数据库表创建语法……………………………………………………………………8
      四 详细设计(代码)………………………………………………………………10
      4.1 系统登陆窗体模块的设计………………………………………………………………10
      4.2 货品入库窗体模块的设计………………………………………………………………11
      4.3 货品出库窗体模块的设计 ………………………………………………………………12
      4.4 货品入库查询窗体模块的设计 ………………………………………………………13
      4.5 货品出库查询窗体模块的设计 ………………………………………………………15
      4.6 用户注销窗体模块的设计 ……………………………………………………………16
      五 程序的实现…………………………………………………………17
      5.1 系统登陆的实现…………………………………………………………………………17
      5.2 货品入库的实现…………………………………………………………………………18
      5.3 货品入库查询的实现 …………………………………………………………………19
      5.4 货品出库的实现 ………………………………………………………………………20
      5.5 货品出库查询的实现 …………………………………………………………………20
      5.6 用户密码修改的实现 …………………………………………………………………20
      六 课程设计总结……………………………………………………21
      七 参考文献 ………………………………………………………21
      二 物资管理系统设计分析
      物资管理系统是典型的信息管理系统,其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两个方面。对于前者要求建立起数据一致性和完整性强、数据安全性好的数据库。而对于后者则要求应用程序功能完备,易使用等特点。
      2.1 需求分析:
      通过对系统的终端用户、生产商和销售商进行分析,可以得到本系统典型的文本需求说明,其中的关键部分如下:
      基本信息是物资管理系统得以运行的数据基础。基本信息包括产品信息、仓库信息、生产商信息和销售商的信息。用户可以通过界面来随时添加、修改和查询这些信息。
      出入库管理是物资管理系统的核心部分,实现产品的出入库登记。产品出入库登记中的产品信息、仓库信息、生产商信息和销售商的信息都是从已有的信息中通过下拉列表选择的,这样可以减少出错,提高效率;如果在基本信息中找不到相关信息即时进行添加。
      根据用户需求,该系统应该实现以下功能:
      1)基本信息(包括产品信息、仓库信息、生产商和销售商信息)的添加、修改和查询。
      2)填写基本信息→提交信息填写
      3)修改基本信息→提交信息修改
      4)选择填写查询条件→提交查询→查询结果显示
      5)产品入库登记、修改和查询。
      6)填写入库产品信息→提交入库登记
      7)修改入库登记→提交信息修改
      8)选择填写查询条件→提交查询→查询结果显示
      9)品出库登记、修改和查询。
      10)出库选择→填写出库产品信息→提交出库登记
      11)修改出库登记→提交信息修改
      12)选择填写查询条件→提交查询→查询结果显示
      13)产品库存统计信息查询
      14)选择查询条件→填写查询内容→提交查询→查询结果显示
      15)用户和物资管理员注册
      16)登录→输入用户名→输入密码→注册
      17)用户修改密码和物资管理员添加用户。
      28)输入旧密码→输入新密码→确认新密码→提交密码修改
      29)本文转载自http://www.biyezuopin.vip/onews.asp?id=13045输入新用户名→输入用户密码→确认密码→设置用户权限→提交用户添加
      2.2模块划分
      在这里插入图片描述

    2.2.1系统功能模块设计
    在这里插入图片描述

    2.2.2数据流程图

    using System;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using System.Data.SqlClient;
    //download by http://www.codefans.net
    namespace CkglS1
    {
    	/// 
    	/// login 的摘要说明。
    	/// 
    	public class login : System.Windows.Forms.Form
    	{
    		private System.Windows.Forms.PictureBox pictureBox1;
    		private System.Windows.Forms.GroupBox groupBox1;
    		private System.Windows.Forms.Button button1;
    		private System.Windows.Forms.Button button2;
    		private System.Windows.Forms.Label label1;
    		private System.Windows.Forms.Label label2;
    		private System.Windows.Forms.TextBox text1;
    		private System.Windows.Forms.TextBox text2;
    		/// 
    		/// 必需的设计器变量。
    		/// 
    		private System.ComponentModel.Container components = null;
    
    		public login()
    		{
    			//
    			// Windows 窗体设计器支持所必需的
    			//
    			InitializeComponent();
    
    			//
    			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    			//
    		}
    
    		/// 
    		/// 清理所有正在使用的资源。
    		/// 
    		protected override void Dispose( bool disposing )
    		{
    			if( disposing )
    			{
    				if(components != null)
    				{
    					components.Dispose();
    				}
    			}
    			base.Dispose( disposing );
    		}
    
    		#region Windows 窗体设计器生成的代码
    		/// 
    		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
    		/// 此方法的内容。
    		/// 
    		private void InitializeComponent()
    		{
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(login));
                this.pictureBox1 = new System.Windows.Forms.PictureBox();
                this.groupBox1 = new System.Windows.Forms.GroupBox();
                this.text2 = new System.Windows.Forms.TextBox();
                this.text1 = new System.Windows.Forms.TextBox();
                this.label2 = new System.Windows.Forms.Label();
                this.label1 = new System.Windows.Forms.Label();
                this.button1 = new System.Windows.Forms.Button();
                this.button2 = new System.Windows.Forms.Button();
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
                this.groupBox1.SuspendLayout();
                this.SuspendLayout();
                // 
                // pictureBox1
                // 
                this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
                this.pictureBox1.Location = new System.Drawing.Point(-3, -2);
                this.pictureBox1.Name = "pictureBox1";
                this.pictureBox1.Size = new System.Drawing.Size(241, 100);
                this.pictureBox1.TabIndex = 0;
                this.pictureBox1.TabStop = false;
                // 
                // groupBox1
                // 
                this.groupBox1.Controls.Add(this.text2);
                this.groupBox1.Controls.Add(this.text1);
                this.groupBox1.Controls.Add(this.label2);
                this.groupBox1.Controls.Add(this.label1);
                this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
                this.groupBox1.Location = new System.Drawing.Point(5, 104);
                this.groupBox1.Name = "groupBox1";
                this.groupBox1.Size = new System.Drawing.Size(242, 89);
                this.groupBox1.TabIndex = 1;
                this.groupBox1.TabStop = false;
                // 
                // text2
                // 
                this.text2.Location = new System.Drawing.Point(77, 53);
                this.text2.Name = "text2";
                this.text2.PasswordChar = '*';
                this.text2.Size = new System.Drawing.Size(156, 21);
                this.text2.TabIndex = 3;
                this.text2.Text = "123456";
                // 
                // text1
                // 
                this.text1.Location = new System.Drawing.Point(77, 20);
                this.text1.Name = "text1";
                this.text1.Size = new System.Drawing.Size(156, 21);
                this.text1.TabIndex = 2;
                this.text1.Text = "admin";
                // 
                // label2
                // 
                this.label2.Location = new System.Drawing.Point(6, 56);
                this.label2.Name = "label2";
                this.label2.Size = new System.Drawing.Size(64, 15);
                this.label2.TabIndex = 1;
                this.label2.Text = "密  码:";
                // 
                // label1
                // 
                this.label1.Location = new System.Drawing.Point(6, 26);
                this.label1.Name = "label1";
                this.label1.Size = new System.Drawing.Size(64, 15);
                this.label1.TabIndex = 0;
                this.label1.Text = "用户名:";
                // 
                // button1
                // 
                this.button1.Location = new System.Drawing.Point(82, 199);
                this.button1.Name = "button1";
                this.button1.Size = new System.Drawing.Size(75, 23);
                this.button1.TabIndex = 2;
                this.button1.Text = "登录";
                this.button1.Click += new System.EventHandler(this.button1_Click);
                // 
                // button2
                // 
                this.button2.Location = new System.Drawing.Point(163, 199);
                this.button2.Name = "button2";
                this.button2.Size = new System.Drawing.Size(75, 23);
                this.button2.TabIndex = 3;
                this.button2.Text = "退出";
                this.button2.Click += new System.EventHandler(this.button2_Click);
                // 
                // login
                // 
                this.AcceptButton = this.button1;
                this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
                this.ClientSize = new System.Drawing.Size(259, 228);
                this.Controls.Add(this.button2);
                this.Controls.Add(this.button1);
                this.Controls.Add(this.groupBox1);
                this.Controls.Add(this.pictureBox1);
                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
                this.MaximizeBox = false;
                this.MinimizeBox = false;
                this.Name = "login";
                this.ShowInTaskbar = false;
                this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
                this.Text = "用户登录";
                this.Closed += new System.EventHandler(this.login_Closed);
                this.Load += new System.EventHandler(this.login_Load);
                ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
                this.groupBox1.ResumeLayout(false);
                this.groupBox1.PerformLayout();
                this.ResumeLayout(false);
    
    		}
    		#endregion
    
    		public bool _log=false;
    		int _count=0;
    		private void button2_Click(object sender, System.EventArgs e)
    		{
    			Application.Exit();
    		}
    
    		private void button1_Click(object sender, System.EventArgs e)
    		{
    			if(text1.Text=="")
    			{
    				MessageBox.Show("请输入用户名。","登录提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
    				text1.Focus();
    			}
    			else
    			{
    				_count++;
    				string _name,_pass;
    				_name=text1.Text.Trim();
    				_pass=text2.Text.Trim();
    				c_form.myad=new SqlDataAdapter("select pass from yh where name='"+_name+"'",c_form.conn);
    				c_form.myad.Fill(c_form.mydata,"yhdl");
    				if(c_form.mydata.Tables["yhdl"].Rows.Count==0)
    				{
    					if(_count==3)
    					{
    						MessageBox.Show("输入三次错误,自动退出登录。","登录提示",MessageBoxButtons.OK,MessageBoxIcon.Stop);
    						Application.Exit();
    					}
    					else
    					{
    						MessageBox.Show("用户名错误,请重新输入。","登录提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
    						text1.Focus();
    					}
    				}
    				else
    				{
    					string _passstr=c_form.mydata.Tables["yhdl"].Rows[0][0].ToString().Trim();
    					if(_passstr!=_pass)
    					{
    						if(_count==3)
    						{
    							MessageBox.Show("输入三次错误,自动退出登录。","登录提示",MessageBoxButtons.OK,MessageBoxIcon.Stop);
    							Application.Exit();
    						}
    						else
    						{
    							MessageBox.Show("密码错误,请重新输入。","登录提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
    							text1.Focus();
    						}
    					}
    					else
    					{
    						c_form._name=_name;
    						_log=true;
    						this.Close();
    					}
    				}
    			}
    		}
    
    		private void login_Closed(object sender, System.EventArgs e)
    		{
    			c_form.mydata.Tables.Clear();
    			if(_log==false)
    				Application.Exit();
    		}
    
            private void login_Load(object sender, EventArgs e)
            {
    
            }
    
    	}
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

  • 相关阅读:
    new Object()到底占用几个字节
    27、Flink 的SQL之SELECT (SQL Hints 和 Joins)介绍及详细示例(2-2)
    喹啉羧酸类 DHODH 抑制剂用于治疗急性髓系白血病
    Java基础知识篇之类的基本概念
    如何搭建普罗米修斯 Prometheus
    【python中级】根据子网掩码位数生成子网掩码
    Python从入门到实践(六)用户输入和while循环
    一种基于柔性事务的分布式事务解决方案设计探究
    八股文复习
    【图解RabbitMQ-4】Docker安装RabbitMQ详细图文过程
  • 原文地址:https://blog.csdn.net/sheziqiong/article/details/127423370