C#版进销库存商品管理系统方案_第1页
C#版进销库存商品管理系统方案_第2页
C#版进销库存商品管理系统方案_第3页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

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

文档简介

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

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

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

4、辑设计】冏品进货表:字段名数据类型是否为主键描述IDInt是bhnchar否进公编pmcnchar是商品名称djnchar是订货单价slnchar是订货数量供应商信息表:字段名数据类型是否为主键描述IDInt是mcnchar否供货商名称dhnchar否供货商电话【窗体设计】登录窗口:登录名称:登录密码,-一一涂一伸户注册新用尸I疏定瞬主窗口:商品进货信息窗口:y商壬进赏,言息商品名称!进货编号:进货单价:进货数量:确定进货信息查询窗口:商品销售信息窗口:fT商品销售信息尚也叵'销售褊号:商品名称:销售数量;销售单价:确定返回归打退货查询窗口:供应商信息窗口:Z供应商信息.|=|回H密|

5、:供应商名福电话号码:确定退回.,退出系统提醒窗口:意见反馈窗口:注册信息窗口:吧湖ft息_=_i_s_i登录名称:登录密码:L魅1l肖-【源代码的实现】登录模块登录模块根据用户角色不同在登陆成功以后被赋予相应的操作权限,对管理系统有对进货商品的录入、销售商品的录入等一些操作权限。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windo

6、ws.Forms;usingSystem.Data.SqlClient;namespacecsharppublicpartialclassForm1:FormpublicForm1()InitializeComponent();privatevoidbutton2_Click(objectsender,EventArgse)privatevoidbutton1_Click(objectsender,EventArgse)SqlConnectioncon=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSec

7、urity=true");con.Open();SqlDataAdapterda=newSqlDataAdapter("select*fromlogwherename='"+textBox1.Text.Trim()+"'andpsw='"+textBox2.Text.Trim()+""',con);DataSetds=newDataSet();da.Fill(ds);if(ds.Tables0.Rows.Count=0)MessageBoxShow("用户名和密码有误.请重新输入”,

8、”系统提示”,MessageBoxButtons.OK,MessageBoxIcon.Error);return;else(MessageBoxShow("登陆成功,欢迎进入!”,”系统提示”,MessageBoxButtons.OK,MessageBoxIcon.Information);Form2f2=newForm2();f2.Show();this.Hide();privatevoidlabel3_Click(objectsender,EventArgse)(Form10f10=newForm10();f10.Show();this.Hide();privatevoidFor

9、m1_Load(objectsender,EventArgse)(登陆主窗体模块进入主窗口时,用户可以依据自己的交易选择不同的窗口进行操作。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespacecsharp(publicpartialclassForm2:Form(publicForm2()(Ini

10、tializeComponent();privatevoidlabel1_Click(objectsender,EventArgse)(objectsender,EventArgsprivatevoid基本档案BToolStripMenuItem_Click(e)(Form3f3=newForm3();f3.Show();this.Hide();privatevoid进货管理CToolStripMenuItem_Click(objectsender,EventArgse)(Form4f4=newForm4();f4.Show();this.Hide();privatevoid销售管理STool

11、StripMenuItem_Click(objectsender,EventArgse)(Form5f5=newForm5();f5.Show();this.Hide();privatevoid库存管理DToolStripMenuItem_Click(objectsender,EventArgse)(Form6f6=newForm6();f6.Show();this.Hide();privatevoid供应商信息ToolStripMenuItem_Click(objectsender,EventArgse)(Form8f8=newForm8();f8.Show();this.Hide();pr

12、ivatevoid系统维护KToolStripMenuItem_Click_1(objectsender,EventArgse)Form6f6=newForm6();f6.Show();this.Hide();privatevoidlabel1_Click_1(objectsender,EventArgse)privatevoidbutton1_Click(objectsender,EventArgse)Form9f9=newForm9();f9.Show();this.Hide();privatevoidbutton2_Click(objectsender,EventArgse)Form1f

13、1=newForm1();f1.Show();this.Hide();privatevoid意见反馈ToolStripMenuItem_Click(objectsender,EventArgse)Form11f11=newForm11();f11.Show();this.Hide();privatevoidForm2_Load(objectsender,EventArgse)商品进货信息模块商品进货信息模块是对每笔进货业务的进货编号、商品名称、进货单价和数量的录入功能的实现。usingSystem;usingSystem.Collections.Generic;usingSystem.Comp

14、onentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespacecsharppublicpartialclassForm3:FormpublicForm3()InitializeComponent();privatevoidtextBox3_TextChanged(objectsender,EventArgse)privatevoidForm3_Load(objectsen

15、der,EventArgse)privatevoidbutton1_Click(objectsender,EventArgse)SqlConnectionconn=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSecurity=true");stringstrsql="insertintodd(bh,mc,dj,sl)values('"+textBox1.Text+"','"+textBox2.Text+"',&#

16、39;"+textBox3.Text+"','"+textBox4.Text+"')"SqlCommandcomm=newSqlCommandstrsql,conn);if(conn.State=ConnectionState.Closed)conn.Open();if(Convert.ToInt32(comm.ExecuteNonQuery()>0)(MessageBoxShow("添加成功O(n_n)O",”提示",MessageBoxButtons.OK,MessageBoxIc

17、on.Information);else(MessageBoxShow(”对不起,失败了:>_<:",”提示",MessageBoxButtons.OK,MessageBoxIcon.Information);conn.Close();privatevoidbutton2_Click(objectsender,EventArgse)(Form2f2=newForm2();f2.Show();this.Close();进货信息查询模块进货信息查询模块是操作人员对进货业务的查询功能,可以通过查询条件,查找相应的信息。usingSystem;usingSystem.C

18、ollections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespacecsharp(publicpartialclassForm4:Form(publicForm4()(InitializeComponent();publicstaticSqlConnectioncon=newSqlConnection(&qu

19、ot;server=SDJS-20140220WP;database=CS;IntegratedSecurity=true"newRichTextBox();sender,publicstaticRichTextBoxrt=privatevoidbutton2_Click(objectEventArgse));Form2f2=newForm2();f2.Show();this.Close();privatevoidtextBox1_TextChanged(objectsender,EventArgse)privatevoidbutton1_Click(objectsender,Eve

20、ntArgse)rt.Size=rt.Location=rt.Font=newSize(457,203);newPoint(17,45);newFont(FontFamily.GenericSerif,13);this.Controls.Add(rt);con.Open();stringsql="select*fromdd"SqlCommandcmd=newSqlCommandsql,con);SqlDataReadersqldr=cmd.ExecuteReader();rt.Text="序号编号名称单价rt.Text+="n"/把数据从sql

21、dr记录集中一行一行的读取出来并赋值给富文本框数量n”;rt的属性textif(sqldr.HasRows)while(sqldr.Read()rt.Text+="""mc"+sqldrsqldr.Close();con.Close();+sqldr"ID”+sqldr"dj"+"1+""+sqldr+sqldr"sl"+"n""bh"+EventArgse)EventArgse)EventArgse)privatevoidForm4_

22、Load(objectsender,商品销售信息模块商品销售信息模块是对每笔销售业务的销售编号、商品名称、销售单价和数量的录入功能的实现。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespacecsharppublicpartialclassFor

23、m5:FormpublicForm5()InitializeComponent();privatevoidbutton2_Click(objectsender,EventArgse)Form2f2=newForm2();f2.Show();this.Close();privatevoidbutton1_Click(objectsender,EventArgse)SqlConnectionconn=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSecurity=true");stringstrsq

24、l="insertintodd(bh,mc,dj,sl)values('"+textBox1.Text+"','"+textBox2.Text+"','"+textBox3.Text+"','"+textBox4.Text+"')"SqlCommandcomm=newSqlCommandstrsql,conn);if(conn.State=ConnectionState.Closed)conn.Open();if(Convert.T

25、oInt32(comm.ExecuteNonQuery()>0)(MessageBoxShow("添加成功O(n_n)O","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);else(MessageBoxShow(”对不起,失败了::>_<:",”提示",MessageBoxButtons.OK,MessageBoxIcon.Information);conn.Close();privatevoidForm5_Load(objectsender,EventAr

26、gse)(商品退货信息模块商品退货信息模块是针对顾客销售退回业务的信息进行查询。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespacecsharp(publicpartialclassForm6:Form(publicForm6()(Initia

27、lizeComponent();privatevoidbutton2_Click(objectsender,EventArgse)(Form2f2=newForm2();f2.Show();this.Close();privatevoidbutton1_Click(objectsender,EventArgse)(SqlConnectionconn=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSecurity=true");stringstrsql="deleteddwhereID=

28、('"+textBox1.Text+"')"SqlCommandcomm=newSqlCommandstrsql,conn);if(conn.State=ConnectionState.Closed)(conn.Open();if(Convert.ToInt32(comm.ExecuteNonQuery()>0)(MessageBoxShow("退货成功,信息已删除,请返回O(n_n)O","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);els

29、e(MessageBoxShow("对不起,删除失败了:>_<:请检测用户名","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);conn.Close();privatevoidbutton3_Click(objectsender,EventArgse)(SqlConnectioncon=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSecurity=true");con.Open();

30、SqlDataAdapterda=newSqlDataAdapter("select*fromddwhereID='"+textBox1.Text.Trim()+""',con);DataSetds=newDataSet();da.Fill(ds);if(ds.Tables0.Rows.Count=0)(MessageBoxShow("单号不存在.请重新输入”,”系统提示”,MessageBoxButtons.OK,MessageBoxIcon.Error);return;else(MessageBoxShow("可以

31、退货,请继续!”,”系统提示”,MessageBoxButtons.OK,MessageBoxIcon.Information);privatevoidForm6_Load(objectsender,EventArgse)(供应商信息模块供应商信息模块是对商品供应商信息的录入,以便查询。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Wi

32、ndows.Forms;usingSystem.Data.SqlClient;namespacecsharp(publicpartialclassForm8:Form(publicForm8()(InitializeComponent();privatevoidmenuStrip1_ItemClicked(objectsender,ToolStripItemClickedEventArgse)(privatevoidForm8_Load(objectsender,EventArgse)(privatevoidbutton2_Click(objectsender,EventArgse)(Form

33、2f2=newForm2();f2.Show();this.Close();privatevoidbutton1_Click(objectsender,EventArgse)SqlConnectionconn=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSecurity=true");stringstrsql="insertintogys(mc,dh)values('"+textBox1.Text+"','"+textBox2.T

34、ext+"')"SqlCommandcomm=newSqlCommandstrsql,conn);if(conn.State=ConnectionState.Closed)conn.Open();if(Convert.ToInt32(comm.ExecuteNonQuery()>0)MessageBoxShow("添加成功O(n_n)O",”提示",MessageBoxButtons.OK,MessageBoxIcon.Information);elseMessageBoxShow(”对不起,失败了:>_<:"

35、;,”提示",MessageBoxButtons.OK,MessageBoxIcon.Information);conn.Close();退出系统提醒模块当用户退出时,会提醒用户是否决定退出系统。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespacecsharppublicpartialc

36、lassForm9:Form(publicForm9()(InitializeComponent();privatevoidbutton2_Click(objectsender,EventArgse)(Form2f2=newForm2();f2.Show();this.Close();privatevoidbutton1_Click(objectsender,EventArgse)(Application.Exit();privatevoidForm9_Load(objectsender,EventArgse)(意见反馈模块对该系统的改进意见反馈模块对该系统的改进对该系统的改进对该系统的改进意

37、见反馈模块,是提供一个平台,将使用者的使用意见反馈给系统程序员,和提高。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Data.SqlClient;namespacecsharp(publicpartialclassForm11:Form(publicForm11()(Initiali

38、zeComponent();privatevoidlabel1_Click(objectsender,EventArgse)(privatevoidbutton1_Click(objectsender,EventArgse)(Form2f2=newForm2();f2.Show();this.Close();privatevoidbutton2_Click(objectsender,EventArgse)(SqlConnectionconn=newSqlConnection("server=SDJS-20140220WP;database=CS;IntegratedSecurity=

39、true");stringstrsql="insertintorep(rp)values('"+richTextBox1+"')"SqlCommandcomm=newSqlCommandstrsql,conn);if(conn.State=ConnectionState.Closed)(conn.Open();if(Convert.ToInt32(comm.ExecuteNonQuery()>0)(MessageBoxShow("留言成功O(n_n)O",”提示",MessageBoxButtons.OK,MessageBoxIcon.Information);else(MessageBoxShow(”对不起,失败了,

温馨提示

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

最新文档

评论

0/150

提交评论