ImageVerifierCode 换一换
格式:DOCX , 页数:18 ,大小:359.52KB ,
资源ID:11167011      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/11167011.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(梅芳婷.docx)为本站会员(b****7)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

梅芳婷.docx

1、梅芳婷企业销售管理系统课程设计报告说明: 参赛小组名单: 项目介绍:企业销售是企业经营的重要组成部分,它可以体现一个企业的经营情况和效益。其中包括基本信息的的显示、商品销售管理、汇总统计与查询。 小组内成员的分工: 罗婉君负责“基本信息查询”和“缺货信息查询“; 梅芳婷负责“商品销售管理”这一模块 石冰鑫负责 ”进货信息添加“和”统计查询“ 王玉琴负责 “用户登录”、“系统退出”及“数据库连接“企业销售管理系统一、需求分析: 1.功能分析: 随着行业竞争的日益激烈,提高销售管理的工作效率,加强企业内部以及整个供应链的各个环节的管理,调度,及资源配置变得极其重要。企业销售是企业经营的重要组成部分

2、,它可以体现一个企业的经营情况和效率。所以对其系统化的管理必不可少。 2.运行环境: 1)系统开发平台: Microsoft Visual Studio 2005 2)系统开发语言: C# 3)系统后台数据库:SQL Server 2000 4)运行平台: Windows XP(SP2)二、系统设计1.系统功能结构2.数据库设计 由于系统的数据较多,因此采取数据库存储数据,数据库命名为db_CompanyManage.在数据库中创建了3个数据表,用于存储不同的信息。其中,tb_Goodsinfo为供应商品的信息,tb_SellGoods为商品销售信息,tb_Account为商品销售的统计状况表

3、。数据库的逻辑设计如下:1) tb_Goodsinfo商品的基本信息2) tb_SellGoods 销售情况记录3) tb_Account汇总统计3、系统文件夹组织结构 Properties为程序属性文件夹;引用为dll引用文件夹,GoodMethod为公共类文件夹。 三具体实现1.公共类设计 getSqlConnection类主要实现与数据库的连接,在代码或其他公共类中可以调用etSqlConnection类连接数据库。etSqlConnection的关键代码如下:public class getSqlConnection string G_Str_connection = Data Sou

4、rce=WWW-37C054AC617;Initial Catalog=db_CompanyManage;Integrated Security=True; SqlConnection G_Con; public getSqlConnection() public SqlConnection GetCon() G_Con = new SqlConnection(G_Str_connection); G_Con.Open(); return G_Con; 2.系统登录模块设计1)系统登录模块主要是对进入系统的用户进行安全检查,以防止非法进入者。是通过匹配预定用户名和密码是咸的,模块运行如图:2)

5、具体实现过程 系统登录窗体的名称为frmLogin.cs,通过输入UserName与PassWord,单击“ENTER”进入,当输入不正确时,会有相应的警告。关键代码如下:private void ENTER_Click(object sender, EventArgs e) string strName = UserName.Text; string strPassword = PassWord.Text; if (strName = XXX & strPassword = 511511) frmMain frm = new frmMain(); frm.Show(); this.Hide(

6、); else MessageBox.Show(Error,Please check username or password); UserName.Text=; PassWord.Text=; 3.主窗体设计1)当用户登录模块成功时,便进入了系统的主窗体。主窗体的运行结果如下:主窗体分为两个部分,一个是系统的菜单栏,其中包括商品销售的基本信息TheBaseinformationofGoods、商品销售的记录SellInformationofGoods、统计Account及系统介绍Aboutsystem;另一部分为退出系统按钮ExitSystemFromHere。2)实现过程主窗体的名称为fr

7、mMain.cs用户通过点击不同的菜单项连接不同的功能。主要通过窗口的show事件和hide事件实现,具体实现代码略。4、商品基本信息的显示模块设计该模块分为两个部分,一是显示所有的商品的基本信息,二是添加商品的进货数量。1)该模块的窗体名称为frmSellGoodinfo.cs.a)ShowAllGoodsInformatoin主要是通过SQL的SELECT语句实现的,关键代码如下: private void toolStripLabel1_Click(object sender, EventArgs e) CN.Hide(); tCN.Hide(); GN.Hide(); tGN.Hide

8、(); Add.Hide(); SqlConnection G_Con = G.GetCon(); DataSet dataset = new DataSet(); try SqlDataAdapter DataAdapter = new SqlDataAdapter(SELECT * FROM tb_Goodsinfo , G_Con); DataAdapter.Fill(dataset, tb_Goodsinfo); baseInfor.DataSource = dataset; baseInfor.DataMember = tb_Goodsinfo; catch (Exception e

9、x) MessageBox.Show(ex.ToString(); finally G_Con.Close(); G_Con.Dispose(); dataset.Dispose(); b)通过add按钮可以更改商品的现有进货数量,实现进货功能。关键代码如下:private void Add_Click(object sender, EventArgs e) string jg =0; string cg=0; SqlConnection G_Con = G.GetCon(); string strSQL = SELECT JhGoodsNum,CurrentGoodsNum FROM tb_

10、Goodsinfo WHERE CompName = + tCN.Text + ; SqlCommand command = new SqlCommand(); command.Connection = G_Con; command.CommandText = strSQL; SqlDataReader reader = command.ExecuteReader(); object row = new objectreader.FieldCount; while (reader.Read() = true) reader.GetValues(row); for (int i = 0; i r

11、eader.FieldCount; i+) if (reader.GetName(i) = JhGoodsNum) jg = rowi.ToString(); if (reader.GetName(i) = CurrentGoodsNum) cg = rowi.ToString(); G_Con.Close(); SqlConnection G1_Con = G.GetCon(); SqlCommand command1 = new SqlCommand(); command1.Connection = G1_Con; string strSQL1 = Update tb_Goodsinfo

12、set ; strSQL1 += JhGoodsNum = + (int.Parse(jg)+int.Parse(tGN.Text).ToString(); strSQL1 += ,CurrentGoodsNum = + (int.Parse(cg)+int.Parse(tGN.Text).ToString(); strSQL1 += WHERE CompName = + tCN.Text + ; command1.CommandText = strSQL1; int n = command1.ExecuteNonQuery(); G1_Con.Close(); SqlConnection G

13、2_Con = G.GetCon(); DataSet dataset = new DataSet(); try SqlDataAdapter DataAdapter = new SqlDataAdapter(SELECT * FROM tb_Goodsinfo , G2_Con); DataAdapter.Fill(dataset, tb_Goodsinfo); baseInfor.DataSource = dataset; baseInfor.DataMember = tb_Goodsinfo; catch (Exception ex) MessageBox.Show(ex.ToStrin

14、g(); finally G_Con.Close(); G_Con.Dispose(); dataset.Dispose(); 5.商品销售统计模块的设计1)该模块主要是完成商品的交易过程,分两步完成:一是计算,看当前库存是否满足销量需要,当小于时,发出警告;二是进行交易,同时更新库存商品数量。2)该模块的窗体窗口名称为frmSellGood.cs.通过Comp和Deal按钮进行相关操作。a)Comp的实现代码如下:private void Comp_Click(object sender, EventArgs e) SellPrice.Text = ; GrossPrice.Text = ;

15、 string CurrentGoodNum=0; SqlConnection G_Con = G.GetCon(); string strSQL = SELECT SellPrice,CurrentGoodsNum FROM tb_Goodsinfo WHERE CompName = + CompName.Text + ; SqlCommand command = null; command = new SqlCommand(); command.Connection = G_Con; command.CommandText = strSQL; SqlDataReader reader =

16、command.ExecuteReader(); object row = new objectreader.FieldCount; while (reader.Read() = true) reader.GetValues(row); for (int i = 0; i reader.FieldCount; i+) if (reader.GetName(i) = SellPrice) SellPrice.Text = rowi.ToString(); if (reader.GetName(i) = CurrentGoodsNum) CurrentGoodNum = rowi.ToString

17、(); if(int.Parse(CurrentGoodNum)(int.Parse(SellGoodNum.Text) MessageBox.Show(inventory shortage,Transaction failure !); SellGoodNum.Text = 0; int nn = (int.Parse(SellPrice.Text) * (int.Parse(SellGoodNum.Text); GrossPrice.Text = nn.ToString(); CurrentTime.Text = DateTime.Now.ToString(); G_Con.Close()

18、; SqlConnection G1_Con = G.GetCon(); string curnum=(int.Parse(CurrentGoodNum) - int.Parse(SellGoodNum.Text).ToString(); SqlCommand command1 = new SqlCommand(); command1.Connection = G1_Con; string strSQL1 = Update tb_Goodsinfo set ; strSQL1 += CurrentGoodsNum = + curnum; strSQL1 += WHERE CompName =

19、+ CompName.Text + ; command1.CommandText = strSQL1; int n = command1.ExecuteNonQuery(); b)Deal的代码实现如下:private void Deal_Click_1(object sender, EventArgs e) SqlConnection G_Con = G.GetCon(); DataSet dataset = new DataSet(); SqlCommand command = null; command = new SqlCommand(); command.Connection = G

20、_Con; string strSQL = SELECT GoodsJhPrice,CurrentGoodsNum FROM tb_Goodsinfo WHERE CompName = + CompName.Text + ; command.CommandText = strSQL; SqlDataReader reader = command.ExecuteReader(); object row = new objectreader.FieldCount; string jp = ; while (reader.Read() = true) reader.GetValues(row); f

21、or (int i = 0; i 0) if (SellGoodNum.Text != 0) MessageBox.Show(Good deal!); else MessageBox.Show(Bad deal!); SqlDataAdapter DataAdapter = new SqlDataAdapter(SELECT CompName,SellGoodsNum,SellGoodTime,GrossPrice FROM tb_SellGoods, G_Con); DataAdapter.Fill(dataset, SellGoods); SellInformation.DataSourc

22、e = dataset; SellInformation.DataMember = dataset.Tables0.ToString(); G1_Con.Close(); SqlConnection G2_Con = G.GetCon(); string strSQL4 = SELECT SellPrice,GoodsNum FROM tb_Goodsinfo WHERE CompName = + CompName.Text + ; SqlCommand command2 = null; command2 = new SqlCommand(); command2.Connection = G2

23、_Con; command2.CommandText = strSQL4; 6.财务处理统计模块设计1) 该模块实现两个功能,一是对相关销售产品的汇总统计,另一方面是对缺货商品的查询。功能一运行结果如下:功能二运行结果如下:2) 该模块的窗体名称为frmAccount.总体销售情况Account汇总实现代码如下: private void accountToolStripMenuItem_Click(object sender, EventArgs e) SqlConnection G_Con = G.GetCon(); DataSet dataset = new DataSet(); Sql

24、DataAdapter DataAdapter = new SqlDataAdapter(SELECT CompName,SUM(SellGoodsNum) AS SumOfSellGoodsNum, SUM(GrossPrice) AS SumOfGrossPrice,SUM(MassOfProfit) AS SumOfMassOfProfit FROM tb_SellGoods GROUP BY CompName , G_Con); DataAdapter.Fill(dataset, SellGoods); AccountData.DataSource = dataset; Account

25、Data.DataMember = dataset.Tables0.ToString(); Stock information信息的查询实现代码如下:private void stockInformationToolStripMenuItem_Click(object sender, EventArgs e) string s=0; SqlConnection G_Con = G.GetCon(); DataSet dataset = new DataSet(); SqlDataAdapter DataAdapter = new SqlDataAdapter(SELECT * FROM tb_

26、Goodsinfo WHERE CurrentGoodsNum = + s + , G_Con); DataAdapter.Fill(dataset, SellGoods); AccountData.DataSource = dataset; 7.关于系统模块设计窗口运行情况如下:四、总结1.首先,通过本次课程设计,加强对C#的语言的运用,对基本的语法有了一定的了解,对面向对象有了较深的认识。2.在此基础上熟悉了.NET的运行环境,还锻炼了运用了数据库SQL的知识解决问题。3.实验中暴露了不少问题。分为以下几个方面:1)小组的协作上分工、讨论上等上存在着许多不协调,需要加强与人合作的能力。2)专业知识上的不足。对数据库的连接、数据的导入、对相关的控件操作等存在严重的不熟练,3)代码的编写上存在的不足a.编程习惯及风格的问题b.代码编写的不严谨,存在许多漏洞,对于异常处理比较少。总之,在以后的编写程序或是完成某一项目时,需要注意以上问题,争取做得更好。五参考文献 1黄兴荣C#课程设计项目教程实验指导与课程设计M.清华大学出版社,2010.6.

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1