版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 .NET 开发与应用说 明 书 学生姓名: 学 号: 学 院: 专 业: 信息管理与信息系统题 目:ERP生产管理系统主界面、成品维护指导教师 2013年2月1日1. 设计任务概述(包括系统总体框图及功能描述)1.1功能描述完成ERP生产管理系统中主界面的设计和成品维护模块,实现主界面和各模块之间的跳转,实现成品的日常管理,可以随时对成品进行增加、删除、修改、查询、刷新、返回操作。1.2 主界面框图ERP生产管理系统 采购管理退出系统基础信息维护采购申请单工序维护原材料维护辅材维护成品维护1
2、.3成品维护框图成品维护刷新修改查询删除增加返回查询内容查询类型2. 功能模块详细设计2.1 详细设计思想2.1.1主界面主界面是从登陆界面跳转进入的,当点击“注册”或“登录”后,界面就由登陆界面转到了主界面。通过需求分析,将主界面分为三大部分,第一部分是基础信息维护,其中又包括成品维护、辅材维护、原材料维护、工序维护四个模块。第二部分是采购管理,包含采购申请单。最后一部分是退出系统。2.1.2成品维护 成品维护主要分为六个部分,分别是增加、删除、修改、查询、刷新、返回。其中,第一部分增加,主要是完成零件名称、零件号、成本价格等十项内容的添加,添加完成后会弹出“成功添加”的提示框;第二部分删除
3、,主要是通过选中要删除的一条数据来实现,当没有选中时会弹出“你想删除哪一行呢?”的提示框来提醒用户,删除后同样弹出“删除成功!”提示框;第三部分修改,主要是完成修改功能,它与添加一样,都是针对十项基本内容进行修改操作;第四部分查询,主要完成查询功能,本身又分为两部分,一个是查询类型,另一个是查询内容,查询时需要对这两项进行操作,类型是从下拉框中选择,内容则是通过键盘输入,当输入不存在的内容后,会弹出“查询无结果”的提示框;第五部分刷新,这部分主要是在以上四种操作后进行,重新获取一遍数据库中表的内容,以显示最新数据;最后一部分是返回,即从成品维护界面跳转至主界面。2.2 核心代码2.2.1主界面
4、(1)基础数据维护 private void 成品维护ToolStripMenuItem_Click(object sender, EventArgs e) View.JiChu.frmProductStoreRoom f = new View.JiChu.frmProductStoreRoom(); f.Text = "成品维护" f.ShowDialog(); private void 辅材维护ToolStripMenuItem_Click(object sender, EventArgs e) View.JiChu.frmFuCai f = new View.JiCh
5、u.frmFuCai(); f.Text = "辅材维护" f.ShowDialog(); private void 原材料维护ToolStripMenuItem_Click(object sender, EventArgs e) View.JiChu.frmBaseMaterial f = new View.JiChu.frmBaseMaterial(); f.Text = "原材料维护" f.ShowDialog(); private void 工序维护ToolStripMenuItem_Click(object sender, EventArgs
6、e) View.JiChu.frmProcessAdd f= new View.JiChu.frmProcessAdd(); f.Text = "工序维护" f.ShowDialog(); 图1(2)采购管理private void 采购申请单ToolStripMenuItem_Click(object sender, EventArgs e) View.CaiGou.frmcaigou f = new View.CaiGou.frmcaigou(); f.Text = "采购申请单" f.ShowDialog(); 图2(3)退出系统 private
7、void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e) Application.Exit(); 2.2.2成品维护图3(1)增加功能public virtual void btnZengJia_Click(object sender, EventArgs e) frmProductStoreRoomAdd f = new frmProductStoreRoomAdd(); f.Text = "增加成品" f.ShowDialog(); btnShunXin_Click(sender, e); public v
8、irtual void zengjia() try product.Manufactory1 = txtManufactory.Text; product.MaterialName1 = txtMaterialName.Text; product.PartNumber1 = txtPartNumber.Text; product.PartName1 = txtPartName.Text; product.CostPrice1 = decimal.Parse(txtCostPrice.Text); product.SellPrice1 = decimal.Parse(txtSellPrice.T
9、ext); product.EarlierAmount1 = txtEarlierAmount.Text; product.EarlierMoney1 = decimal.Parse(txtEarlierMoney.Text); product.AddDate1 = DateTime.Parse(dtpAddDate.Text); product.MinimumStock1 = int.Parse(txtMinimumStock.Text); product.Amount1 = decimal.Parse(txtAmount.Text); int i = Model.Dao.clsDfProd
10、uctStoreRoom.insertprodectstoreroom(product); if (i = 1) MessageBox.Show("成功添加"); this.Close(); catch MessageBox.Show("请仔细填写全部内容"); 图4 图5 图6(2)删除功能public virtual void btnShanChu_Click(object sender, EventArgs e) if (this.dgvChengPin.SelectedRows.Count = 1) product.Pid1 = int.Pars
11、e(this.dgvChengPin.SelectedRows0.Cells0.Value.ToString(); Model.Dao.clsDfProductStoreRoom.deleteprodectstoreroom(product); btnShunXin_Click(sender,e); else MessageBox.Show("你想删除哪一行呢?"); public static void deleteprodectstoreroom(Model.Entity.clsEfProductStoreRoom prodectstoreroom) string sq
12、l = "delete from a_fProductStoreRoom where Pid='" + prodectstoreroom.Pid1 + "' " int i = Common.DBConnection.insertable(sql); if (i = 1) MessageBox.Show("删除成功!"); 图7 图8(3)修改功能public virtual void btnXiuGai_Click(object sender, EventArgs e) if (this.dgvChengPin.Se
13、lectedRows.Count = 1) frmProductStoreRoomAdd f = new frmProductStoreRoomAdd(); View.JiChu.frmProductStoreRoomAdd.strPid=this.dgvChengPin.SelectedRows0.Cells0.Value.ToString(); f.Text = "修改成品" f.ShowDialog(); btnShunXin_Click(sender, e); else MessageBox.Show("请选择一行"); public stati
14、c void updateprodectstoreroom(Model.Entity.clsEfProductStoreRoom prodectstoreroom) string sql = "update a_fProductStoreRoom set Manufactory='" + prodectstoreroom.Manufactory1 + "'" + ",PartName='" + prodectstoreroom.PartName1 + "',PartNumber='&q
15、uot; + prodectstoreroom.PartNumber1 + "',CostPrice='" + prodectstoreroom.CostPrice1 + "',SellPrice='" + prodectstoreroom.SellPrice1 + "',EarlierAmount='" + prodectstoreroom.EarlierAmount1 + "'," + "MaterialName='" + pr
16、odectstoreroom.MaterialName1 + "',AddDate='" + prodectstoreroom.AddDate1 + "',EarlierMoney='" + prodectstoreroom.EarlierMoney1 + "',MinimumStock='" + prodectstoreroom.MinimumStock1 + "',Amount='" + prodectstoreroom.Amount1 + &qu
17、ot;'" + "where Pid='" + prodectstoreroom.Pid1 + "'" int i = Common.DBConnection.insertable(sql); if (i = 1) MessageBox.Show("修改成功!"); public virtual void frmProductStoreRoomAdd_Load(object sender, EventArgs e) if(this.Text.Contains("修改") try s
18、tring sql = "select * from a_fProductStoreRoom where Pid='" + strPid + "'" DataTable dt = Common.DBConnection.getdatatable(sql); txtManufactory.Text = dt.Rows0"Manufactory".ToString(); txtPartName.Text = dt.Rows0"PartName".ToString(); txtPartNumber.Tex
19、t = dt.Rows0"PartNumber".ToString(); txtCostPrice.Text = dt.Rows0"CostPrice".ToString(); txtSellPrice.Text = dt.Rows0"SellPrice".ToString(); txtEarlierAmount.Text = dt.Rows0"EarlierAmount".ToString(); txtMaterialName.Text = dt.Rows0"MaterialName".ToS
20、tring(); dtpAddDate.Text = dt.Rows0"AddDate".ToString(); txtEarlierMoney.Text = dt.Rows0"EarlierMoney".ToString(); txtMinimumStock.Text = dt.Rows0"MinimumStock".ToString(); txtAmount.Text = dt.Rows0"Amount".ToString(); catch MessageBox.Show("修改失败");
21、图9图10图11(4)查询功能public virtual void btnChaZhao_Click(object sender, EventArgs e) string sql; switch (this.cmbLeiXing.Text.Trim() case "Pid": sql = "select*from a_fProductStoreRoom where Pid like '%" + txtNeiRong.Text + "%'" break; case "Manufactory": sq
22、l = "select*from a_fProductStoreRoom where Manufactory like '%" + txtNeiRong.Text + "%'" break; case "PartName": sql = "select*from a_fProductStoreRoom where PartName like '%" + txtNeiRong.Text + "%'" break; case "PartNumber"
23、;: sql = "select*from a_fProductStoreRoom where PartNumber like '%" + txtNeiRong.Text + "%'" break; case "CostPrice": sql = "select*from a_fProductStoreRoom where CostPrice like '%" + txtNeiRong.Text + "%'" break; case "SellPrice
24、": sql = "select*from a_fProductStoreRoom where SellPrice like '%" + txtNeiRong.Text + "%'" break; case "EarlierAmount": sql = "select*from a_fProductStoreRoom where EarlierAmount like '%" + txtNeiRong.Text + "%'" break; case &qu
25、ot;MaterialName": sql = "select*from a_fProductStoreRoom where MaterialName like '%" + txtNeiRong.Text + "%'" break; case "AddDate": sql = "select*from a_fProductStoreRoom where AddDate like '%" + txtNeiRong.Text + "%'" break; ca
26、se "EarlierMoney": sql = "select*from a_fProductStoreRoom where EarlierMoney like '%" + txtNeiRong.Text + "%'" break; case "MinimumStock": sql = "select*from a_fProductStoreRoom where MinimumStock like '%" + txtNeiRong.Text + "%'
27、" break; case "Amount": sql = "select*from a_fProductStoreRoom where Amount like '%" + txtNeiRong.Text + "%'" break; default: sql = "select*from a_fProductStoreRoom" break; try DataTable dt = Model.Dao.clsDfProductStoreRoom.ShuaXinprodectstoreroom
28、(dgvChengPin, sql); int count = int.Parse(dt.Rows00.ToString(); catch MessageBox.Show("查询无结果"); 图12 图13(5)刷新功能public virtual void btnShunXin_Click(object sender, EventArgs e) string sql = "select * from a_fProductStoreRoom" Model.Dao.clsDfProductStoreRoom.ShuaXinprodectstoreroom(
29、dgvChengPin,sql;(6)返回功能public virtual void btnFanHui_Click(object sender, EventArgs e) this.Close(); 3. 课程设计心得、存在问题及解决方法通过本次课程设计,加深了我对.net的理解,理论与实践相结合,了解.net程序设计的流程、步骤,进一步熟悉VS2010、SQL2008。由于是小组合作,除了要让自己负责的模块完善,更要注意整个程序的结合,这就要求我们必须在分析阶段就将公用的数据库、类进行统一命名,否则会出现返工的现象,既浪费时间、精力,也更容易使程序出现问题。4. 附录(源程序代码)4.1主
30、界面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 ERP public partial class frmMain : Form public frmMain() InitializeComponent(); private void 成品维护ToolStripMenuIt
31、em_Click(object sender, EventArgs e) View.JiChu.frmProductStoreRoom f = new View.JiChu.frmProductStoreRoom(); f.Text = "成品维护" f.ShowDialog(); private void 辅材维护ToolStripMenuItem_Click(object sender, EventArgs e) View.JiChu.frmFuCai f = new View.JiChu.frmFuCai(); f.Text = "辅材维护" f.
32、ShowDialog(); private void 原材料维护ToolStripMenuItem_Click(object sender, EventArgs e) View.JiChu.frmBaseMaterial f = new View.JiChu.frmBaseMaterial(); f.Text = "原材料维护" f.ShowDialog(); private void 工序维护ToolStripMenuItem_Click(object sender, EventArgs e) View.JiChu.frmProcessAdd f= new View.Ji
33、Chu.frmProcessAdd(); f.Text = "工序维护" f.ShowDialog(); private void 采购管理ToolStripMenuItem_Click(object sender, EventArgs e) private void 采购申请单ToolStripMenuItem_Click(object sender, EventArgs e) View.CaiGou.frmcaigou f = new View.CaiGou.frmcaigou(); f.Text = "采购申请单" f.ShowDialog();
34、private void 退出系统ToolStripMenuItem_Click(object sender, EventArgs e) Application.Exit(); private void frmMain_Load(object sender, EventArgs e) 4.2成品维护using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u
35、sing System.Windows.Forms;namespace ERP.View.JiChu public partial class frmProductStoreRoom : Form Model.Entity.clsEfProductStoreRoom product = new Model.Entity.clsEfProductStoreRoom(); public frmProductStoreRoom() InitializeComponent(); public virtual void btnZengJia_Click(object sender, EventArgs
36、e) frmProductStoreRoomAdd f = new frmProductStoreRoomAdd(); f.Text = "增加成品" f.ShowDialog(); btnShunXin_Click(sender, e); public virtual void btnXiuGai_Click(object sender, EventArgs e) if (this.dgvChengPin.SelectedRows.Count = 1) frmProductStoreRoomAdd f = new frmProductStoreRoomAdd(); Vie
37、w.JiChu.frmProductStoreRoomAdd.strPid=this.dgvChengPin.SelectedRows0.Cells0.Value.ToString(); f.Text = "修改成品" f.ShowDialog(); btnShunXin_Click(sender, e); else MessageBox.Show("请选择一行"); public virtual void btnShunXin_Click(object sender, EventArgs e) string sql = "select * f
38、rom a_fProductStoreRoom" Model.Dao.clsDfProductStoreRoom.ShuaXinprodectstoreroom(dgvChengPin,sql); public virtual void btnShanChu_Click(object sender, EventArgs e) if (this.dgvChengPin.SelectedRows.Count = 1) product.Pid1 = int.Parse(this.dgvChengPin.SelectedRows0.Cells0.Value.ToString(); Model
39、.Dao.clsDfProductStoreRoom.deleteprodectstoreroom(product); btnShunXin_Click(sender,e); else MessageBox.Show("你想删除哪一行呢?"); public virtual void btnFanHui_Click(object sender, EventArgs e) this.Close(); public virtual void btnChaZhao_Click(object sender, EventArgs e) string sql; switch (this
40、.cmbLeiXing.Text.Trim() case "Pid": sql = "select*from a_fProductStoreRoom where Pid like '%" + txtNeiRong.Text + "%'" break; case "Manufactory": sql = "select*from a_fProductStoreRoom where Manufactory like '%" + txtNeiRong.Text + "
41、%'" break; case "PartName": sql = "select*from a_fProductStoreRoom where PartName like '%" + txtNeiRong.Text + "%'" break; case "PartNumber": sql = "select*from a_fProductStoreRoom where PartNumber like '%" + txtNeiRong.Text + &q
42、uot;%'" break; case "CostPrice": sql = "select*from a_fProductStoreRoom where CostPrice like '%" + txtNeiRong.Text + "%'" break; case "SellPrice": sql = "select*from a_fProductStoreRoom where SellPrice like '%" + txtNeiRong.Text
43、+ "%'" break; case "EarlierAmount": sql = "select*from a_fProductStoreRoom where EarlierAmount like '%" + txtNeiRong.Text + "%'" break; case "MaterialName": sql = "select*from a_fProductStoreRoom where MaterialName like '%"
44、+ txtNeiRong.Text + "%'" break; case "AddDate": sql = "select*from a_fProductStoreRoom where AddDate like '%" + txtNeiRong.Text + "%'" break; case "EarlierMoney": sql = "select*from a_fProductStoreRoom where EarlierMoney like '%&
45、quot; + txtNeiRong.Text + "%'" break; case "MinimumStock": sql = "select*from a_fProductStoreRoom where MinimumStock like '%" + txtNeiRong.Text + "%'" break; case "Amount": sql = "select*from a_fProductStoreRoom where Amount like
46、9;%" + txtNeiRong.Text + "%'" break; default: sql = "select*from a_fProductStoreRoom" break; try DataTable dt = Model.Dao.clsDfProductStoreRoom.ShuaXinprodectstoreroom(dgvChengPin, sql); int count = int.Parse(dt.Rows00.ToString(); catch MessageBox.Show("查询无结果")
47、; private void frmProductStoreRoom_Load(object sender, EventArgs e) using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data.SqlClient;using System.Data;using System.Windows.Forms;namespace ERP.Model.Dao class clsDfProductStoreRoom public static int insertp
48、rodectstoreroom(Model.Entity.clsEfProductStoreRoom prodectstoreroom) SqlConnection conn = Common.DBConnection.getCon(); conn.Open(); string sql = "insert into a_fProductStoreRoom (Manufactory,PartName,PartNumber,CostPrice,SellPrice,"+ "EarlierAmount,MaterialName,AddDate,EarlierMoney,MinimumStock,Amount) values('" + prodectstoreroom.Manufactory1 + "'" + ",'" + prodectstoreroom.PartName1 + "','" + prodect
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年零担货物运输合同范文
- 山西公共基础知识47
- 2024年劳务派遣实习协议范本
- 2024年标准版离婚协议书模板
- 吉林公务员面试模拟38
- 2024年合同样本 用工合同样本
- 业务居间合同三2024年
- 2024年重组家庭离婚协议范文
- 2024年二手机动车买卖合同
- 2024年只投资不参与经营协议书范本(1020字)
- 2024年保安员证考试题库及答案(共160题)
- 主要负责人和安全生产管理人员安全培训课件初训修订版
- 电动汽车充电设施及场站测试评价规范第2部分:场站设施
- 重庆市拔尖强基联盟2025届高三上学期10月联合考试地理含答案
- 2024年新人教版道德与法治一年级上册 9 作息有规律 教学课件
- 2024新人教版道法一年级上册第二单元:过好校园生活大单元整体教学设计
- 2024年深圳技能大赛-鸿蒙移动应用开发(计算机程序设计员)职业技能竞赛初赛理论知识
- 大数据与会计专业实习报告个人小结
- 高等传热学全册课件
- 2024版小学英语新课程标准测试题及答案
- 全国职业院校技能大赛中职组(养老照护赛项)选拔赛考试题库500题(含答案)
评论
0/150
提交评论