C#版进销库存商品管理系统--精选文档_第1页
C#版进销库存商品管理系统--精选文档_第2页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 目 录第一章 开发背景和环境3第二章 程序功能分析及描述3-4第三章 总体和详细设计5-11第四章 实现源码12-27第五章 总结 27第一章【开发背景】 随着我国大小企业经营规模越来越大,企业需要随时更新产品的进销信息,不断更改商品信息,并对商品进行系统分析。因此企业商品的进销管理系统需要引进新的管理软件,实现企业庞大的进销商品的管理规范化,从而方便企业的进销商品的决策。【开发环境】 开发平台:Microsoft Visual Studio 2010开发语言:Visual C# 2010后台数据库管理系统软件:Microsoft SQL Server运行平台:Windows 7 第二章 【

2、程序功能分析及描述】在对企业销售管理系统有了深刻的认识后,为了解决企业销售人员在商品管理和日常销售中所存在的不足,让企业工作人员有更好的、更方便的使用计算机对企业有关数据进行管理,以实现无纸化操作方面进行分析,企业系统应进行以下功能的实现。登录模块登录模块根据用户角色不同在登陆成功以后被赋予相应的操作权限,对管理系统有对进货商品的录入、销售商品的录入等一些操作权限。登陆主窗体模块 进入主窗口时,用户可以依据自己的交易选择不同的窗口进行操作。商品进货信息模块 商品进货信息模块是对每笔进货业务的进货编号、商品名称、进货单价和数量的录入功能的实现。进货信息查询模块进货信息查询模块是操作人员对进货业务

3、的查询功能,可以通过查询条件,查找相应的信息。商品销售信息模块商品销售信息模块是对每笔销售业务的销售编号、商品名称、销售单价和数量的录入功能的实现。商品退货信息模块商品退货信息模块是针对顾客销售退回业务的信息进行查询。供应商信息模块 供应商信息模块是对商品供应商信息的录入,以便查询。退出提醒系统模块当用户退出时,会提醒用户是否决定退出系统 意见反馈模块意见反馈模块,是提供一个平台,将使用者的使用意见反馈给系统程序员,对该系统的改进和提高。 注册登录新用户模块注册新用户信息。第三章【总体和详细设计】 企业进销库存销售管理管理系统功能结构图:请输入留言供应商电话供应商名称退货编号销售数量销售单价商

4、品名称销售编号查询条件进货数量进货单价商品名称【逻辑设计】商品进货表:字段名数据类型是否为主键描述IDInt是bhnchar否进货编号mcnchar是商品名称djnchar是订货单价slnchar是订货数量供应商信息表:字段名数据类型是否为主键描述IDInt是mcnchar否供货商名称dhnchar否供货商电话【窗体设计】 登录窗口: 主窗口:商品进货信息窗口:进货信息查询窗口:商品销售信息窗口:退货查询窗口:供应商信息窗口:退出系统提醒窗口:意见反馈窗口:注册信息窗口:【源代码的实现】登录模块登录模块根据用户角色不同在登陆成功以后被赋予相应的操作权限,对管理系统有对进货商品的录入、销售商品的

5、录入等一些操作权限。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace csharp public partial class Form1 : Form public Form1() InitializeComponent(

6、); private void button2_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection("server=SDJS-20140220WP;database=CS;Integrated Security =true"); con.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from log

7、 where name='" + textBox1.Text.Trim() + "'and psw='" + textBox2.Text.Trim() + "'", con); DataSet ds = new DataSet(); da.Fill(ds); if (ds.Tables0.Rows.Count = 0) MessageBox.Show("用户名和密码有误.请重新输入", "系统提示", MessageBoxButtons.OK, MessageBoxIcon

8、.Error); return; else MessageBox.Show("登陆成功,欢迎进入!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); Form2 f2= new Form2(); f2.Show(); this.Hide(); private void label3_Click(object sender, EventArgs e) Form10 f10 =new Form10(); f10.Show(); this.Hide(); private void Form

9、1_Load(object sender, EventArgs e) 登陆主窗体模块进入主窗口时,用户可以依据自己的交易选择不同的窗口进行操作。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace csharp public partial class Form2 : Form p

10、ublic Form2() InitializeComponent(); private void label1_Click(object sender, EventArgs e) private void 基本档案BToolStripMenuItem_Click(object sender, EventArgs e) Form3 f3 = new Form3(); f3.Show(); this.Hide(); private void 进货管理CToolStripMenuItem_Click(object sender, EventArgs e) Form4 f4 = new Form4(

11、); f4.Show(); this.Hide(); private void 销售管理SToolStripMenuItem_Click(object sender, EventArgs e) Form5 f5= new Form5(); f5.Show(); this.Hide(); private void 库存管理DToolStripMenuItem_Click(object sender, EventArgs e) Form6 f6 = new Form6(); f6.Show(); this.Hide(); private void 供应商信息ToolStripMenuItem_Cl

12、ick(object sender, EventArgs e) Form8 f8 = new Form8(); f8.Show(); this.Hide(); private void 系统维护KToolStripMenuItem_Click_1(object sender, EventArgs e) Form6 f6 = new Form6(); f6.Show(); this.Hide(); private void label1_Click_1(object sender, EventArgs e) private void button1_Click(object sender, Ev

13、entArgs e) Form9 f9 = new Form9(); f9.Show(); this.Hide(); private void button2_Click(object sender, EventArgs e) Form1 f1=new Form1(); f1.Show(); this.Hide(); private void 意见反馈ToolStripMenuItem_Click(object sender, EventArgs e) Form11 f11 = new Form11(); f11.Show(); this.Hide(); ; private void Form

14、2_Load(object sender, EventArgs e) 商品进货信息模块商品进货信息模块是对每笔进货业务的进货编号、商品名称、进货单价和数量的录入功能的实现。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace

15、csharp public partial class Form3 : Form public Form3() InitializeComponent(); private void textBox3_TextChanged(object sender, EventArgs e) private void Form3_Load(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=

16、SDJS-20140220WP;database=CS;Integrated Security =true"); string strsql = "insert into dd(bh,mc,dj,sl) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')" SqlCo

17、mmand comm = new SqlCommand(strsql, conn); if (conn.State = ConnectionState.Closed) conn.Open(); if (Convert.ToInt32(comm.ExecuteNonQuery() > 0) MessageBox.Show("添加成功O(_)O", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show("对不起,失败了:>_<:

18、", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); private void button2_Click(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); 进货信息查询模块进货信息查询模块是操作人员对进货业务的查询功能,可以通过查询条件,查找相应的信息。using System;using System.Collections.Generic;using System

19、.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace csharp public partial class Form4 : Form public Form4() InitializeComponent(); public static SqlConnection con = new SqlConnection("server=

20、SDJS-20140220WP;database=CS;Integrated Security =true"); public static RichTextBox rt = new RichTextBox(); private void button2_Click(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void textBox1_TextChanged(object sender, EventArgs e) private void button1_C

21、lick(object sender, EventArgs e) rt.Size = new Size(457, 203); rt.Location = new Point(17, 45); rt.Font = new Font(FontFamily.GenericSerif, 13); this.Controls.Add(rt); con.Open(); string sql = "select * from dd " SqlCommand cmd = new SqlCommand(sql, con); SqlDataReader sqldr = cmd.ExecuteR

22、eader(); rt.Text = "序号 编号 名称 单价 数量n" rt.Text += "-n" /把数据从sqldr记录集中一行一行的读取出来并赋值给富文本框 rt的属性 text if (sqldr.HasRows) while (sqldr.Read() rt.Text += " " + sqldr"ID" + " " + sqldr"bh" + " " + sqldr"mc" + " " + sqld

23、r"dj" + " " + sqldr"sl" + "n" sqldr.Close(); con.Close(); private void Form4_Load(object sender, EventArgs e) 商品销售信息模块商品销售信息模块是对每笔销售业务的销售编号、商品名称、销售单价和数量的录入功能的实现。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using S

24、ystem.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace csharp public partial class Form5 : Form public Form5() InitializeComponent(); private void button2_Click(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); pr

25、ivate void button1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-20140220WP;database=CS;Integrated Security =true"); string strsql = "insert into dd(bh,mc,dj,sl) values ('" + textBox1.Text + "','" + textBox2.Text + &qu

26、ot;','" + textBox3.Text + "','" + textBox4.Text + "')" SqlCommand comm = new SqlCommand(strsql, conn); if (conn.State = ConnectionState.Closed) conn.Open(); if (Convert.ToInt32(comm.ExecuteNonQuery() > 0) MessageBox.Show("添加成功O(_)O", "提示

27、", MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show("对不起,失败了:>_<: ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); private void Form5_Load(object sender, EventArgs e) 商品退货信息模块商品退货信息模块是针对顾客销售退回业务的信息进行查询。using System;using

28、System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace csharp public partial class Form6 : Form public Form6() InitializeComponent(); private void button2_Click

29、(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void button1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-20140220WP;database=CS;Integrated Security =true"); string strsql = "delete dd where ID=('"

30、 + textBox1.Text + "')" SqlCommand comm = new SqlCommand(strsql, conn); if (conn.State = ConnectionState.Closed) conn.Open(); if (Convert.ToInt32(comm.ExecuteNonQuery() > 0) MessageBox.Show("退货成功,信息已删除,请返回O(_)O", "提示", MessageBoxButtons.OK, MessageBoxIcon.Informa

31、tion); else MessageBox.Show("对不起,删除失败了:>_<:请检测用户名 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); private void button3_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection("server=SDJS-20140220WP;database=CS;Integrated Secur

32、ity =true"); con.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from dd where ID='" + textBox1.Text.Trim() + "'", con); DataSet ds = new DataSet(); da.Fill(ds); if (ds.Tables0.Rows.Count = 0) MessageBox.Show("单号不存在.请重新输入", "系统提示", Messag

33、eBoxButtons.OK, MessageBoxIcon.Error); return; else MessageBox.Show("可以退货,请继续!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); private void Form6_Load(object sender, EventArgs e) 供应商信息模块供应商信息模块是对商品供应商信息的录入,以便查询。using System;using System.Collections.Generic;using Syst

34、em.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace csharp public partial class Form8 : Form public Form8() InitializeComponent(); private void menuStrip1_ItemClicked(object sender, ToolStripIte

35、mClickedEventArgs e) private void Form8_Load(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void button1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-20140220WP;

36、database=CS;Integrated Security =true"); string strsql = "insert into gys(mc,dh) values ('" + textBox1.Text + "','" + textBox2.Text + "')" SqlCommand comm = new SqlCommand(strsql, conn); if (conn.State = ConnectionState.Closed) conn.Open(); if (Conv

37、ert.ToInt32(comm.ExecuteNonQuery() > 0) MessageBox.Show("添加成功O(_)O", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show("对不起,失败了:>_<: ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); 退出系统提醒模块当用户退出时,会

38、提醒用户是否决定退出系统。 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace csharp public partial class Form9 : Form public Form9() InitializeComponent(); private void button2_

39、Click(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void button1_Click(object sender, EventArgs e) Application.Exit(); private void Form9_Load(object sender, EventArgs e) 意见反馈模块意见反馈模块,是提供一个平台,将使用者的使用意见反馈给系统程序员,对该系统的改进和提高。using System;using System.Collections.Ge

40、neric;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace csharp public partial class Form11 : Form public Form11() InitializeComponent(); private void label1_Click(object sender, Even

41、tArgs e) private void button1_Click(object sender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void button2_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-20140220WP;database=CS;Integrated Security =true"); string strsql = &q

42、uot;insert into rep(rp) values ('" + richTextBox1 + "')" SqlCommand comm = new SqlCommand(strsql, conn); if (conn.State = ConnectionState.Closed) conn.Open(); if (Convert.ToInt32(comm.ExecuteNonQuery() > 0) MessageBox.Show("留言成功O(_)O", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show("对不起,失败了,请稍后重试!

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论