




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上目 录第一章 开发背景和环境3第二章 程序功能分析及描述3-4第三章 总体和详细设计5-11第四章 实现源码12-27第五章 总结 27第一章【开发背景】 随着我国大小企业经营规模越来越大,企业需要随时更新产品的进销信息,不断更改商品信息,并对商品进行系统分析。因此企业商品的进销管理系统需要引进新的管理软件,实现企业庞大的进销商品的管理规范化,从而方便企业的进销商品的决策。【开发环境】 开发平台:Microsoft Visual Studio 2010开发语言:Visual C# 2010后台数据库管理系统软件:Microsoft SQL Server运行平台:Win
2、dows 7 第二章 【程序功能分析及描述】在对企业销售管理系统有了深刻的认识后,为了解决企业销售人员在商品管理和日常销售中所存在的不足,让企业工作人员有更好的、更方便的使用计算机对企业有关数据进行管理,以实现无纸化操作方面进行分析,企业系统应进行以下功能的实现。登录模块登录模块根据用户角色不同在登陆成功以后被赋予相应的操作权限,对管理系统有对进货商品的录入、销售商品的录入等一些操作权限。登陆主窗体模块 进入主窗口时,用户可以依据自己的交易选择不同的窗口进行操作。商品进货信息模块 商品进货信息模块是对每笔进货业务的进货编号、商品名称、进货单价和数量的录入功能的实现。进货信息查询模块进货信息查询
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() Initiali
6、zeComponent(); private void button2_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection("server=SDJS-WP;database=CS;Integrated Security =true"); con.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from
7、 log 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, MessageBox
8、Icon.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
9、Form1_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 : Fo
10、rm public 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 Fo
11、rm4(); 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 供应商信息ToolStripMenuIte
12、m_Click(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
13、, EventArgs 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
14、Form2_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;namesp
15、ace 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("ser
16、ver=SDJS-WP;database=CS;Integrated Security =true"); string strsql = "insert into dd(bh,mc,dj,sl) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')" SqlComman
17、d 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("对不起,失败了:>_<: &quo
18、t;, "提示", 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.Com
19、ponentModel;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=SDJS
20、-WP;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_Click(object
21、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.ExecuteReader(); rt.
22、Text = "序号 编号 名称 单价 数量n" rt.Text += "-n" /把数据从sqldr记录集中一行一行的读取出来并赋值给富文本框 rt的属性 text if (sqldr.HasRows) while (sqldr.Read() rt.Text += " " + sqldr"ID" + " " + sqldr"bh" + " " + sqldr"mc" + " " + sqldr"dj&qu
23、ot; + " " + 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 System.Drawin
24、g;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(); private void b
25、utton1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-WP;database=CS;Integrated Security =true"); string strsql = "insert into dd(bh,mc,dj,sl) values ('" + textBox1.Text + "','" + textBox2.Text + "','"
26、 + 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", "提示", MessageBoxBu
27、ttons.OK, MessageBoxIcon.Information); else MessageBox.Show("对不起,失败了:>_<: ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); private void Form5_Load(object sender, EventArgs e) 商品退货信息模块商品退货信息模块是针对顾客销售退回业务的信息进行查询。using System;using System.Collections.G
28、eneric;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(object sender, Even
29、tArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void button1_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-WP;database=CS;Integrated Security =true"); string strsql = "delete dd where ID=('" + textBox1.Text + "
30、9;)" 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(
31、"对不起,删除失败了:>_<:请检测用户名 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); private void button3_Click(object sender, EventArgs e) SqlConnection con = new SqlConnection("server=SDJS-WP;database=CS;Integrated Security =true"); con.Open(); SqlDat
32、aAdapter 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("单号不存在.请重新输入", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error
33、); return; else MessageBox.Show("可以退货,请继续!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); private void Form6_Load(object sender, EventArgs e) 供应商信息模块供应商信息模块是对商品供应商信息的录入,以便查询。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;
34、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, ToolStripItemClickedEventArgs e) private void Fo
35、rm8_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-WP;database=CS;Integrated Security =true")
36、; 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 (Convert.ToInt32(comm.ExecuteNonQuery() > 0) M
37、essageBox.Show("添加成功O(_)O", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show("对不起,失败了:>_<: ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); conn.Close(); 退出系统提醒模块当用户退出时,会提醒用户是否决定退出系统。 using System;using System.Coll
38、ections.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_Click(object sender, EventArgs e) Form2 f2 =
39、 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.Generic;using System.ComponentModel;using Syst
40、em.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, EventArgs e) private void button1_Click(object s
41、ender, EventArgs e) Form2 f2 = new Form2(); f2.Show(); this.Close(); private void button2_Click(object sender, EventArgs e) SqlConnection conn = new SqlConnection("server=SDJS-WP;database=CS;Integrated Security =true"); string strsql = "insert into rep(rp) values ('" + richTe
42、xtBox1 + "')" 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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 大数据行业介绍
- 旅游景点翻译调查
- 四川省自贡市自流井区自贡市第一中学2024-2025学年下学期高三二模地理试题(解析版)
- 交易费用对投资的影响试题及答案
- 江苏省镇江市句容市2024-2025学年高二上学期期末语文试题
- 2025年广东中考地理综合模拟卷
- 2025届安徽省滁州市高三下学期一模考试历史试题(解析版)
- 2024年特许金融分析师考试难点突破与试题及答案
- 投资分析与组合管理试题及答案
- 2024年特许金融分析师考试个人规划试题及答案
- 【电气专业】15D501建筑物防雷设施安装
- 四位数乘四位数乘法题500道
- 信贷催收业务模式与系统架构搭建
- 安师大《化学教学论实验》期末试卷(两套)及答案
- 2016年一级建造师考试《水利工程管理与实务》电子书
- 高速公路服务区房建工程施工组织设计
- 保健食品试卷答案
- YS/T 377-2010标准热电偶用铂铑10-铂偶丝
- GB/T 5019.9-2009以云母为基的绝缘材料第9部分:单根导线包绕用环氧树脂粘合聚酯薄膜云母带
- 法语动词变位
- GB/T 21726-2018黄茶
评论
0/150
提交评论