ERP生產(chǎn)管理系統(tǒng)主界面、成品維護說明書_第1頁
ERP生產(chǎn)管理系統(tǒng)主界面、成品維護說明書_第2頁
ERP生產(chǎn)管理系統(tǒng)主界面、成品維護說明書_第3頁
ERP生產(chǎn)管理系統(tǒng)主界面、成品維護說明書_第4頁
ERP生產(chǎn)管理系統(tǒng)主界面、成品維護說明書_第5頁
已閱讀5頁,還剩22頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、 .NET 開發(fā)與應用說 明 書   學生姓名:  學 號:  學 院: 專 業(yè): 信息管理與信息系統(tǒng)題 目:ERP生產(chǎn)管理系統(tǒng)主界面、成品維護指導教師   2013年2月1日1. 設計任務概述(包括系統(tǒng)總體框圖及功能描述)1.1功能描述完成ERP生產(chǎn)管理系統(tǒng)中主界面的設計和成品維護模塊,實現(xiàn)主界面和各模塊之間的跳轉,實現(xiàn)成品的日常管理,可以隨時對成品進行增加、刪除、修改、查詢、刷新、返回操作。1.2 主界面框圖ERP生產(chǎn)管理系統(tǒng) 采購管理退出系統(tǒng)基礎信息維護采購申請單工序維護原材料維護輔材維護成品維護1

2、.3成品維護框圖成品維護刷新修改查詢刪除增加返回查詢內(nèi)容查詢類型2. 功能模塊詳細設計2.1 詳細設計思想2.1.1主界面主界面是從登陸界面跳轉進入的,當點擊“注冊”或“登錄”后,界面就由登陸界面轉到了主界面。通過需求分析,將主界面分為三大部分,第一部分是基礎信息維護,其中又包括成品維護、輔材維護、原材料維護、工序維護四個模塊。第二部分是采購管理,包含采購申請單。最后一部分是退出系統(tǒng)。2.1.2成品維護 成品維護主要分為六個部分,分別是增加、刪除、修改、查詢、刷新、返回。其中,第一部分增加,主要是完成零件名稱、零件號、成本價格等十項內(nèi)容的添加,添加完成后會彈出“成功添加”的提示框;第二部分刪除

3、,主要是通過選中要刪除的一條數(shù)據(jù)來實現(xiàn),當沒有選中時會彈出“你想刪除哪一行呢?”的提示框來提醒用戶,刪除后同樣彈出“刪除成功!”提示框;第三部分修改,主要是完成修改功能,它與添加一樣,都是針對十項基本內(nèi)容進行修改操作;第四部分查詢,主要完成查詢功能,本身又分為兩部分,一個是查詢類型,另一個是查詢內(nèi)容,查詢時需要對這兩項進行操作,類型是從下拉框中選擇,內(nèi)容則是通過鍵盤輸入,當輸入不存在的內(nèi)容后,會彈出“查詢無結果”的提示框;第五部分刷新,這部分主要是在以上四種操作后進行,重新獲取一遍數(shù)據(jù)庫中表的內(nèi)容,以顯示最新數(shù)據(jù);最后一部分是返回,即從成品維護界面跳轉至主界面。2.2 核心代碼2.2.1主界面

4、(1)基礎數(shù)據(jù)維護 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)退出系統(tǒng) private

7、void 退出系統(tǒng)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("請仔細填寫全部內(nèi)容"); 圖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。由于是小組合作,除了要讓自己負責的模塊完善,更要注意整個程序的結合,這就要求我們必須在分析階段就將公用的數(shù)據(jù)庫、類進行統(tǒng)一命名,否則會出現(xiàn)返工的現(xiàn)象,既浪費時間、精力,也更容易使程序出現(xiàn)問題。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 退出系統(tǒng)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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論