畢業(yè)論文- 中小企業(yè)ERP管理系統(tǒng)_第1頁
畢業(yè)論文- 中小企業(yè)ERP管理系統(tǒng)_第2頁
畢業(yè)論文- 中小企業(yè)ERP管理系統(tǒng)_第3頁
畢業(yè)論文- 中小企業(yè)ERP管理系統(tǒng)_第4頁
畢業(yè)論文- 中小企業(yè)ERP管理系統(tǒng)_第5頁
已閱讀5頁,還剩38頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、編號NO: 河北農(nóng)業(yè)大學本科畢業(yè)設(shè)計論文題目 中小企業(yè)ERP管理系統(tǒng) 學生姓名 學號 成績 學院 現(xiàn)代科技學院 專業(yè)班級 計算機科學與技術(shù)0901 指導教師姓名 指導教師職稱 教授 材料目錄:1、任務(wù)書 ( 1 )份2、進度計劃表 ( 1 )份3、開題報告(含文獻綜述) ( 1 )份5、答辯記錄表 ( 1 )份6、論文正文 ( 1 )份7、其它材料 河北農(nóng)業(yè)大學 本科畢業(yè)論文(設(shè)計)題 目: 中小商業(yè)企業(yè)ERP 學 院: 現(xiàn)代科技學院 專業(yè)班級: 計算機科學與技術(shù)0901 學 號: 學生姓名: 指導教師姓名: 指導教師職稱: 教授 二O一三 年 六 月 一 日摘 要在我們生活的21世紀里計算機

2、技術(shù)已經(jīng)在各行各業(yè)中發(fā)揮著不可替代的作用。當前越來越多的商業(yè)、企事業(yè)單位已經(jīng)將計算機技術(shù)應(yīng)用于日常的管理工作,以信息技術(shù)為主要標志的科技進步日新月異,高科技成果向現(xiàn)實生產(chǎn)力的轉(zhuǎn)化越來越快。企業(yè)的物資供應(yīng)管理往往是很復雜繁瑣的,由于掌握的物資種類眾多,訂貨,管理,發(fā)放的渠道各有差異,各個企業(yè)之間的管理體制不盡相同,各類統(tǒng)計計劃報表繁多,因此物資管理必須實現(xiàn)計算機化,而且必須根據(jù)企業(yè)的具體情況制定便提高工作效率。傳統(tǒng)的依靠管理人員人工傳遞信息和數(shù)據(jù)的管理方式就無法滿足企業(yè)日益增長的業(yè)務(wù)需求了。根據(jù)當前存在的問題,聯(lián)系實際情況設(shè)計實現(xiàn)了一個具有部分ERP(Enterprise Resource Pl

3、anning)功能的管理網(wǎng)站,盡力做到降低實施成本,減少實施風險,加快實施進度,增加投資回報。這是一個基于WEB頁面的、B/S(Browser/Server)模式的管理系統(tǒng)。本系統(tǒng)采用的是編程工具Visual studio Ultimate 2012。利用ASP.NET和Microsoft Sql Server 2008 R2(RTM) 技術(shù)實現(xiàn)的B/S模式的ERP的解決方案。關(guān)鍵詞:計算機技術(shù) ERP ASP.NET Sql Server 2008 R2AbstractComputer technology has been playing an irreplaceable role in

4、all walks of life in the 21st century. Currently with more and more business, enterprises and institutions having applied computer technology to daily management, technological advances indicated mainly by information technology has been occurring every day and the transformation from high-tech achi

5、evements to real productivity has been faster and faster. The material supply management is often very complicated because of the variety of materials, variation in order, management and distribution channels, distinct management systems within each company and large amount of statistical planning r

6、eports. Therefore, to enhance work efficiency material management must be computerized and designed in accordance with each enterprises specific condition while the traditional management method which relies on the management personnel to transmit information and data is not able to meet the growing

7、 needs of enterprises. Considering the current problem and the actual situation, a management website with the part function of Enterprise Resource Planning is designed to reduce the implementation cost and risk, accelerate implement progress and increase return on investment. This management system

8、 is based on the model of WEB page and B/S(Browser/Server)and uses the programming tool of Visual studio Ultimate 2012. It uses the ERP solution of B/S mode which is achieved by ASP.NET and Microsoft Sql Server 2008 R2(RTM). Key words: Computer technology ERP ASP.NET Sql Server 2008 R2 目錄TOC o 1-3 h

9、 u HYPERLINK l _Toc16968 第一章 緒論 第一章 緒論1.1 ERP管理系統(tǒng)開發(fā)背景簡介 ERP管理系統(tǒng)是用計算機管理庫存進出的一種計算機應(yīng)用技術(shù)的創(chuàng)新,在計算機還未普及之前庫存管理、人員管理等都是由工作人員手工書寫的方式來操作的。產(chǎn)品的采購、庫存、銷售等信息的管理存在工作量大、工作效率低下、耗費人員過多等問題,從而導致勞力資本投入量大、市場及消費者的反饋信息不能及時處理等。ERP管理系統(tǒng)充分發(fā)揮信息技術(shù)的優(yōu)勢,它是整合了 HYPERLINK /wiki/%E4%BC%81%E4%B8%9A%E7%AE%A1%E7%90%86%E7%90%86%E5%BF%B5 o 企業(yè)

10、管理理念 企業(yè)管理理念、 HYPERLINK /wiki/%E4%B8%9A%E5%8A%A1%E6%B5%81%E7%A8%8B o 業(yè)務(wù)流程 業(yè)務(wù)流程、基礎(chǔ)數(shù)據(jù)、人力物力、計算機硬件和軟件于一體的企業(yè)資源管理系統(tǒng)。通過對本次需求的了解我們需要通過集中式的信息數(shù)據(jù)庫,將企業(yè)的進,銷,存,財務(wù)、統(tǒng)計、報表、系統(tǒng)管理等經(jīng)營業(yè)務(wù)有機的結(jié)合起來,達到數(shù)據(jù)共享,降低成本,提高效率,改進服務(wù)的目的,進而提高企業(yè)的生產(chǎn)效率和管理水平。 1.2 ERP管理系統(tǒng)B/S結(jié)構(gòu) 本系統(tǒng)采用B/S設(shè)計模式,B/S (Brower/Server)模式又稱B/S結(jié)構(gòu),是軟件系統(tǒng)體系結(jié)構(gòu)的一種。B/S是WEB興起后的一種網(wǎng)

11、絡(luò)結(jié)構(gòu)模式,WEB瀏覽器是客戶端最主要的應(yīng)用軟件。這種模式統(tǒng)一了客戶端,將系統(tǒng)功能實現(xiàn)的核心部分集中到服務(wù)器上,簡化了系統(tǒng)的開發(fā)、維護和使用??蛻魴C上只要安裝一個瀏覽器(Browser),如firefox或Internet Explorer,服務(wù)器安裝Oracle、Sybase、Informix或 SQL Server等數(shù)據(jù)庫。瀏覽器通過Web Server 同數(shù)據(jù)庫進行數(shù)據(jù)交互。第二章 相關(guān)技術(shù)與開發(fā)工具簡介本系統(tǒng)使用開發(fā)軟件Visual studio Ultimate 2012進行開發(fā),使用Microsoft Sql Server 2008 R2(RTM)作為后臺數(shù)據(jù)庫設(shè)計,利用ASP.N

12、ET語言編寫代碼,配合功能強大的SQL查詢語言實現(xiàn)建立關(guān)系數(shù)據(jù)庫,訪問數(shù)據(jù)庫,對數(shù)據(jù)庫的更新。2.1 Microsoft Sql Server 2008 R2(RTM)簡介Microsoft Sql Server 2008 R2 是關(guān)系數(shù)據(jù)庫開發(fā)工具,我們使用它來開發(fā)和設(shè)計所需要的數(shù)據(jù)庫。Microsoft Sql Server 2008 R2 能提供超大型系統(tǒng)所需的數(shù)據(jù)庫服務(wù)。大型服務(wù)器可能有成千上萬的用戶同時連接到 Microsoft Sql Server 2008 R2 實例。Microsoft Sql Server 2008 R2 為這些環(huán)境提供了全面的保護,具有防止問題發(fā)生的安全措施

13、??梢栽谝慌_計算機上運行多個 Microsoft Sql Server 2008 R2 實例。Microsoft Sql Server 2008 R2 應(yīng)用程序可在裝有 Microsoft Sql Server 2008 R2 的計算機上運行。該應(yīng)用程序通過 Windows 進程間通訊 (IPC) 組件(例如共享內(nèi)存)而非通過網(wǎng)絡(luò)連接到 Microsoft Sql Server 2008 R2。2.2 Visual studio Ultimate 2012開發(fā)環(huán)境簡介Microsoft Visual Studio 2012 Ultimate旗艦版(vs20121)是一個最先進的開發(fā)解決方案,它

14、使各種規(guī)模的團隊能夠設(shè)計和創(chuàng)建出使用戶欣喜的引人注目的應(yīng)用程序。在Visual Studio 2012旗艦版(VS2012)中您可以使用靈活敏捷的規(guī)劃工具(如容量規(guī)劃、任務(wù)板和積壓工作管理)來按照您自己的進度實現(xiàn)增量開發(fā)技術(shù)和敏捷方法。Visual Studio 2012 作為一個集成解決方案,適用于無論是個人或者各種規(guī)模的開發(fā)團隊。Visual Studio 2012實現(xiàn)了同事間的無縫協(xié)作,提高了生產(chǎn)效率與專注度,最終好的點子變成了優(yōu)秀的現(xiàn)實應(yīng)用。您可以使用靈活敏捷的規(guī)劃工具(如容量規(guī)劃、任務(wù)板和積壓工作管理)來按照您自己的進度實現(xiàn)增量開發(fā)技術(shù)和敏捷方法。Visual Studio 2012

15、 是一個綜合性產(chǎn)品系列,適用于每一位希望升級或創(chuàng)建精彩應(yīng)用程序的組織、團體和個人開發(fā)人員。 VS2012 通過整合先前單個產(chǎn)品中的功能并為每個版本加入新的強大功能,簡化了產(chǎn)品系列,并且,它更加適合用于開發(fā) Windows8 專用程序。第三章 中小型商業(yè)企業(yè)ERP管理系統(tǒng)設(shè)計分析3.1 設(shè)計思想第一步就是需要利用SQL Server 2008R2建立所需要的關(guān)系數(shù)據(jù)庫,第二步就使用Visual studio Ultimate 2012完成該系統(tǒng)的開發(fā)。將建立數(shù)據(jù)庫所在的服務(wù)器作為服務(wù)器端,在這里我所用的是本地服務(wù)器,為開發(fā)的Web應(yīng)用程序的提供所需要的數(shù)據(jù)服務(wù)。當然,具體來說就是指Web應(yīng)用開發(fā)

16、程序和數(shù)據(jù)庫的連接,本系統(tǒng)主要是通過ADO.NET來訪問SQL Server 2008R2數(shù)據(jù)庫3.2 系統(tǒng)可行性分析可行性分析是系統(tǒng)分析階段的第二項活動,它的主要目是進一步明確系統(tǒng)的目標、規(guī)模與功能,對系統(tǒng)開發(fā)背景、必要性和意義進行了調(diào)查分析并根據(jù)需要和可能提出開發(fā)系統(tǒng)的初步方案與計劃。可行性分析是對系統(tǒng)進行全面、概要的分析。通過調(diào)查分析,本系統(tǒng)設(shè)計主要有以下三個可行性:3.2.1 操作可行性本系統(tǒng)操作簡單,易于理解,只需通過簡單指導,上手較快,客戶端只需要web瀏覽器即可。跨平臺性比較強。3.2.2 經(jīng)濟可行性在經(jīng)濟方面,由于商場規(guī)模的日益增大,進出貨物數(shù)量繁多,且工作量大。原有的手工操作

17、耗時費力,又不能保證數(shù)據(jù)的正確性,迫切需要實現(xiàn)計算機信息化管理,用信息化管理實現(xiàn)對數(shù)據(jù)的錄入、查詢、打印等的處理。比起傳統(tǒng)的方法這樣可以節(jié)省大量的人力物力資源,又可以縮短業(yè)務(wù)處理的時間,加強對物資安全的管理,具有很強的實用性和經(jīng)濟性。3.2.3 技術(shù)可行性在技術(shù)方面,本系統(tǒng)采用Microsoft公司的ASP.NET以及SQL Server 2008R2設(shè)計一個既滿足用戶需求又操作方便而且界面友好的ERP系統(tǒng)web頁面。ASP.NET是一種基于窗體的可視化組件安排的聯(lián)合,具有強大的數(shù)據(jù)庫管理功能,支持SQL數(shù)據(jù)庫查詢,利用ASP.NET中嵌入的數(shù)據(jù)庫管理功能幾乎可以操縱各種格式的數(shù)據(jù)庫。3.3

18、系統(tǒng)功能模塊劃分根據(jù)對超市業(yè)務(wù)的管理進行分析,可得到本系統(tǒng)的功能模塊圖如圖3-1所示:圖3-1 系統(tǒng)總功能結(jié)構(gòu)圖3.4 數(shù)據(jù)流圖 圖3-2 系統(tǒng)數(shù)據(jù)流程圖3.5 系統(tǒng)數(shù)據(jù)庫分析與設(shè)計根據(jù)對系統(tǒng)數(shù)據(jù)的分析,本系統(tǒng)共需要11張表,用途如表3-1所示:表3-1數(shù)據(jù)庫數(shù)據(jù)清單 數(shù)據(jù)表名稱 數(shù)據(jù)表用途系統(tǒng)管理員表(T_user)保存管理員信息訂單表(T_order)保存訂單信息進貨表(T_inventory)保存進貨信息 商品表(T_product)保存商品信息現(xiàn)存商品表(T_extantProduct) 保存現(xiàn)存商品信息供貨商表(T_supplier)保存供貨商信息客戶表(T_custorm)保存客戶

19、信息倉庫表(T_warehouse)保存?zhèn)}庫信息訂單狀態(tài)表(T_orderStateName) 保存訂單狀態(tài)信息用戶狀態(tài)表(T_userStatus)保存用戶狀態(tài)信息倉庫狀態(tài)表(T_warehouseStatus)保存?zhèn)}庫狀態(tài)信息表3-2客戶表(T_custorm)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1custormIdint40是是否2custormNamenvarchar500是3custormTelnvarchar500是4custormAddressnvarchar500是5custormPersonnvarchar500是6custormEmailnvarchar5

20、00是表3-3 現(xiàn)存商品表(T_extantProduct)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵 允許空默認值說明1Idint4 0是是否2product_Idint4 0是9warehouseint4 0是10numberint40是表3-4 進貨表(T_inventory)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值 說明1save_idint40是是否2product_Idint40是3number_inint40是4price_inmoney84是5supplierint40是6warehouseint40是7Time_purchasedatetime83是表3-5訂單表(T_

21、order)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1order_idint40是是否2order_nonvarchar500是3custormerIdint40是4productIdint40是5orderPricemoney84是6orderNumberint40是7warehouseint40是8order_datedatetime83是9stateint40是是表3-6訂單狀態(tài)表(T_orderStateName)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1idint40是否2orderNamenvarchar500是表3-7商品表(T_product)序號列

22、名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1product_idint40是是否2namenvarchar500是5standardvarchar500是6unitnvarchar500是8suppliernvarchar500是9up_numberint40是10down_numberint40是11stateint40是表3-8供貨商表(T_supplier)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1supplierIdint40是是否2supplierNamenvarchar500是3supplierTelvarchar500是4supplierAddressnvar

23、char500是5suppliercontactnvarchar500是表3-9系統(tǒng)管理員表(T_user)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1Idint40是是否2UserIdnvarchar1000否3UserNamenvarchar500是4UserPassWordnvarchar1000是5Emallnvarchar1000是6Statustinyint10是7warehouseint40是表3-9用戶狀態(tài)表(T_userStatus)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1userIdint40否2userStatusnvarchar200是表3-

24、10倉庫表(T_warehouse) 序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1warehouseIdint40是是否2warehouseNamenvarchar500是3statustinyint10是表3-11倉庫狀態(tài)表(T_warehouseStatus)序號列名數(shù)據(jù)類型長度小數(shù)位標識主鍵外鍵允許空默認值說明1Idint40 否2Namenvarchar500 是第四章 中小型商業(yè)企業(yè)ERP管理系統(tǒng)應(yīng)用程序設(shè)計本系統(tǒng)實現(xiàn)數(shù)據(jù)的計算輸出、存盤、歷史記錄的顯示,基礎(chǔ)數(shù)據(jù)信息包括系統(tǒng)管理(添加用戶、管理用戶);進貨管理(添加進貨、歷史進貨查詢);銷售管理(銷售單、銷售單管理);基

25、本資料管理(添加倉庫、倉庫管理、添加供貨商、供貨商管理、添加庫戶、客戶管理、添加商品、商品管理);財務(wù)統(tǒng)計管理(盤點報表、總收益管理)等功能。本系統(tǒng)是由三個人一起完成,我所完成的功能是前臺界面、銷售管理和財務(wù)報表部分。下面我將把整個系統(tǒng)的功能介紹一下,然后我將我所涉及到的網(wǎng)頁的后臺思想和代碼做一下詳細介紹4.1 登入頁面登入界面設(shè)有賬號和密碼,使的程序安全性更高,如圖(4-1-1圖 4-1-1 登陸界面4.2 系統(tǒng)管理在管理員賬戶登入的情況下,可以在系統(tǒng)管理中可以實現(xiàn)對用戶的管理,可以添加用戶,刪除用戶和對用戶狀態(tài)的管理。 4.2.1 添加用戶添加用戶的賬號。姓名、密碼等用戶信息。如圖(4-2

26、圖4-2-1 添加用戶信息4.2.2 管理用戶可以對用戶的狀態(tài)、所在倉庫進行管理,并且能夠刪除用戶。如圖(4-2-1):圖4-2-2 用戶管理4.3 進貨管理用戶可以通過此模塊添加進貨和對進貨進行歷史查詢,添加進貨可以選擇所放倉庫,選擇供應(yīng)商。4.3.1 添加進貨 添加需要的商品、商品的數(shù)量價格等信息。如圖(4-3 圖4-3-1 添加進貨4.3.2 進貨歷史查圖4-3-2 進貨歷史查詢 4.4 銷售管理用戶可以通過此模塊添加銷售單和對銷售單進行管理。4.4.1 銷售單其中訂貨單號是日期加上每天訂單的個數(shù)來確定訂單的唯一性,如圖(4-4-1): 圖4-4-1 添加銷售訂單銷售單部分后臺代碼如下:

27、using BLL;using System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.IO;using Model;using System.Data.SqlClient;namespace graduation_project public partial class sales_ticket : System.Web.UI.Page

28、 protected void Page_Load(object sender, EventArgs e) if (!IsPostBack) bing(); streamreader(); protected void bing() string productStr = select * from dbo.T_product; DataTable dt = BLL.ProductBll.getAllProduct(productStr); productName.DataSource = dt.DefaultView; productName.DataTextField = dt.Colum

29、ns1.ToString(); productName.DataValueField = dt.Columns0.ToString(); productName.DataBind(); dt = warehouseBll.getWareHouse(); orderwarehouse.DataSource = dt.DefaultView; orderwarehouse.DataTextField = dt.Columns1.ToString(); orderwarehouse.DataValueField = dt.Columns0.ToString(); orderwarehouse.Sel

30、ectedIndex = 0; orderwarehouse.DataBind(); dt = BLL.custormBll.getAllCustorm(); custormer.DataSource = dt.DefaultView; custormer.DataTextField = dt.Columns1.ToString(); custormer.DataValueField = dt.Columns0.ToString(); custormer.SelectedIndex = 0; custormer.DataBind(); dt.Dispose(); public void str

31、eamreader() StreamReader sr =new StreamReader(Server.MapPath(images/data.txt),true); string orderNumber = sr.ReadToEnd(); string date = orderNumber.Substring(0,8); string dt = DateTime.Now.ToString(yyyyMMdd); int number = Convert.ToInt32(orderNumber.Substring(orderNumber.Length-3); if (date = dt) nu

32、mber+; if (number 100) date = date + number; else date=date+number.ToString().PadLeft(3, 0); else date = dt + 001; orderId.Text = date; sr.Dispose(); protected void submit_Click(object sender, EventArgs e) Model.order order = new Model.order(); order.P_Order_no = orderId.Text;/訂單號 order.P_OrderNumbe

33、r = Convert.ToInt32(orderNumber.Text);/訂貨數(shù)量 order.P_OrderPrice = Convert.ToInt32(orderPrice.Text);/訂貨價格 order.P_WarehouseId = Convert.ToInt32(orderwarehouse.SelectedValue);/出貨倉庫 order.P_State=0;/訂單狀態(tài) order.P_Order_date = DateTime.Now;/訂單時間 order.P_CustormerId=Convert.ToInt32(custormer.SelectedValue)

34、;/訂單客戶 order.P_ProductId=Convert.ToInt32(productName.SelectedValue);/產(chǎn)品名稱 string sql = insert into T_order values(order_no,custormerId,productId,orderPrice,orderNumber,warehouse,order_date,state); int i = BLL.OrderBll.insertIntoOrder(sql, new SqlParameter(order_no, order.P_Order_no), new SqlParamete

35、r(custormerId, order.P_CustormerId), new SqlParameter(productId, order.P_ProductId), new SqlParameter(orderPrice, order.P_OrderPrice), new SqlParameter(orderNumber, order.P_OrderNumber), new SqlParameter(warehouse, order.P_WarehouseId), new SqlParameter(order_date, order.P_Order_date), new SqlParame

36、ter(state, order.P_State); int j = 0; if (i 0) if (BLL.extantProductDal.SelectextantProduct(order.P_ProductId, order.P_WarehouseId) 0) sql = UPDATE T_extantProduct SET number=number-in_quantity where warehouse=warehouse and product_Id=product_Id; j = BLL.extantProductDal.updateextantProduct(sql, new

37、 SqlParameter(product_Id, order.P_ProductId), new SqlParameter(in_quantity, order.P_OrderNumber), new SqlParameter(warehouse, order.P_WarehouseId); if (i 0) StreamWriter sw = new StreamWriter(Server.MapPath(images/data.txt), false); sw.Write(orderId.Text); sw.Flush(); sw.Dispose(); Response.Redirect

38、(sales_ticket.aspx); else Response.Write(alert(生成訂單失敗);); 銷售單部分前臺代碼如下: body width:746px; height:470px; margin:0 auto; overflow:hidden; .center position:absolute; top:50px; left:150px; width:746px; span width:60px; text-align:right; .button width:70px; margin-left:60px; text-align:center; vertical-al

39、ign:middle; 商品名稱: 訂貨單號: 銷售價格: 銷售數(shù)量: 客戶名稱: 出貨倉庫: 4.4.2 銷售單管理 銷售單管理這個模塊實現(xiàn)的是可以實現(xiàn)對銷售單的管理,可以管理銷售單的狀態(tài)。如圖(4-4-2):圖4-4-2 銷售單的管理銷售單管理部分后臺代碼:using System;using System.Collections.Generic;using System.Data;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace graduati

40、on_project public partial class ManageSalesTicket : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) if (!IsPostBack) /根據(jù)Id得到客戶名稱 protected string getCustormNameById(int id) return BLL.custormBll.getCustormNameById(id)1.ToString(); /根據(jù)ID得到產(chǎn)品名稱 protected string getProductNameBy

41、Id(int id) return BLL.ProductBll.getProductNameById(id)1.ToString(); /根據(jù)Id得到倉庫名字 protected string getWarehouseNameById(int id) return BLL.warehouseBll.getWareHouseById(id).P_warehouseName.ToString(); /得到所有訂單狀態(tài) protected DataTable getAllOrderstateName() return BLL.orderStateNameBll.getAllOrderstateNa

42、me(); protected int getOrderStateNameSortById(int id) /Response.Write(alert( + BLL.orderStateNameBll.getOrderStateNameSortById(id)0.ToString() + );); return Convert.ToInt32(BLL.orderStateNameBll.getOrderStateNameSortById(id)0.ToString(); protected void orderstate_SelectedIndexChanged(object sender,

43、EventArgs e) DropDownList ddl = sender as DropDownList; Label lb = ddl.Parent.FindControl(product_id) as Label; int id = Convert.ToInt32(lb.Text); int state = Convert.ToInt32(ddl.SelectedValue); if (BLL.OrderBll.UpdateProductStatus(id, state) 0) else Response.Write(alert(操作失敗);); 銷售單管理部分前臺代碼: body w

44、idth:95%; margin:0; height:470px; overflow:hidden; .center position:absolute; top:70px; left:100px; width:746px; asp:Label ID=custormer runat=server Text= asp:Label ID=product runat=server Text= asp:Label ID=warehouse runat=server Text= asp:Label Text= runat=server id=product_id Visible=false asp:Dr

45、opDownList ID=orderstate AutoPostBack=True runat=server DataSource= DataTextField=orderName DataValueField=id OnSelectedIndexChanged=orderstate_SelectedIndexChanged SelectedIndex= asp:SqlDataSource ID=ManageOrder runat=server ConnectionString= SelectCommand=SELECT * FROM T_order 4.5 基本資料管理基本資料管理包括添加

46、倉庫、倉庫管理、添加供貨商、供貨商管理、添加客戶、客戶管理、添加商品、商品管理。4.5.1 添加倉庫 添加倉庫的名稱,默認狀態(tài)是可用。如圖(4-5-1):圖 4-5-1 添加倉庫4.5.2 倉庫管理 圖 4-5-2 倉庫管理4.5.3 添加供貨商 圖 4-5-3 添加供應(yīng)商4.5.4 供貨商管理 圖 4-5-4 4.5.5 添加客戶 圖4-5-5 添加客戶4.5.6 客戶管理 圖 4-5-6 客戶管理4.5.7 添加商品 圖 4-5-7 添加商品4.5.8 商品管理 圖 4-5-8 商品管理4.6 財務(wù)報表4.6.1 盤點報表 圖 4-6-1 盤點報表盤點報表部分后臺代碼:using Syst

47、em;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace graduation_project public partial class report : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected string getProductNameById(int id) re

48、turn BLL.ProductBll.getProductNameById(id)1.ToString(); protected string getWarehouseNameById(int id) return BLL.warehouseBll.getWareHouseById(id).P_warehouseName.ToString(); 盤點報表部分前臺代碼: body width:95%; margin:0; height:470px; overflow:hidden; .center position:absolute; top:70px; left:100px; width:7

49、46px; asp:Label ID=productname runat=server Text= asp:Label ID=warehouse1 runat=server Text= asp:Label ID=out runat=server Text= asp:SqlDataSource ID=extantProductDataSource runat=server ConnectionString= SelectCommand=SELECT duct_Id,tp.warehouse,isnull(tp.number,0)AS Nextant,isnull(it.number_in,0)

50、AS Nin,isnull(od.orderNumber,0) AS Nout FROM (SELECT product_Id,warehouse,SUM(number)AS number FROM dbo.T_extantProduct GROUP BY product_Id,warehouse) tp LEFT JOIN (SELECT product_Id,warehouse,SUM(number_in) AS number_in FROM dbo.T_inventory GROUP BY product_Id,warehouse) it ON duct_Id=duct_Id AND t

51、p.warehouse=it.warehouse LEFT JOIN (SELECT productId,warehouse,SUM(orderNumber)AS orderNumber FROM dbo.T_order GROUP BY productId,warehouse) od ON ductId=duct_Id AND od.warehouse=tp.warehouse var a = document.getElementsByTagName(span); for (var i = 0; i a.length; i+) if (ai.innerHTML = 需要禁戒) ai.sty

52、le.color = blue; else if (ai.innerHTML = 需要進貨) ai.style.color = red; 4.6.2 總收益報表 圖 4-6-2 總收益報表部分后臺代碼:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace graduation_project public partial class report : System.

53、Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected string getProductNameById(int id) return BLL.ProductBll.getProductNameById(id)1.ToString(); protected string getWarehouseNameById(int id) return BLL.warehouseBll.getWareHouseById(id).P_warehouseName.ToString(); 總收益報表部分前臺代碼: b

54、ody width:95%; margin:0; height:470px; overflow:hidden; .center position:absolute; top:70px; left:100px; width:746px; asp:Label ID=productname runat=server Text= asp:Label ID=warehouse1 runat=server Text= asp:Label ID=pricein runat=server Text= asp:Label ID=pricein runat=server Text= asp:Label ID=pr

55、icein runat=server Text= asp:SqlDataSource ID=SqlDataSource1 runat=server ConnectionString= SelectCommand=SELECT duct_Id,tp.warehouse,isnull(tp.number,0)AS Nextant,it.price_in,isnull(it.number_in,0) AS Nin,isnull(od.orderNumber,0) AS Nout,isnull(od.orderprice,0) as Norderprice,(isnull(od.orderprice,

56、0)-it.price_in)*isnull(od.orderNumber,0) as Nshouyi FROM (SELECT product_Id,warehouse,SUM(number)AS number FROM dbo.T_extantProduct GROUP BY product_Id,warehouse) tp LEFT JOIN (SELECT product_Id,warehouse,MAX(price_in) as price_in,SUM(number_in) AS number_in FROM dbo.T_inventory GROUP BY product_Id,

57、warehouse) it ON duct_Id=duct_Id AND tp.warehouse=it.warehouse LEFT JOIN (SELECT productId,warehouse,MAX(orderPrice) as orderprice,SUM(orderNumber)AS orderNumber FROM dbo.T_order GROUP BY productId,warehouse) od ON ductId=duct_Id AND od.warehouse=tp.warehouse 第五章 系統(tǒng)測試運行完成對流程的編碼后最重要的事情就是對系統(tǒng)的測試工作了,測試在

58、系統(tǒng)設(shè)計階段有兩個時期,通常在編寫每個模塊后做單元測試,另一個時期是對系統(tǒng)的綜合測試。5.1 測試計劃及過程本次測試只針對系統(tǒng)的部分功能模塊進行的。5.1.1 添加銷售單測試測試進度由于功能相對簡單,所以只用一個小時的時間對此功能進行測試。負責人安排本人。測試方法:添加銷售單的信息,點擊確定按鈕,查看銷售單中訂貨單號是否增加1,再在銷售單管理界面查看是否有剛剛添加的信息,如果有說明添加成功,否則添加失敗。 5.1.2 銷售單管理測試測試進度由于功能簡單,所以只用半個時的時間對此功能進行測試。負責人安排本人。測試方法:點擊銷售單管理的連接,查看銷售單列表,在銷售單列表的訂單狀態(tài)操作上更改訂單狀態(tài)

59、,再次刷新本網(wǎng)頁,查看是否修改成功。5.1.3盤點報表測試測試進度由于功能相對簡單,所以只用一個小時的時間對此功能進行測試。負責人安排本人。測試方法:點擊盤點報表的連接,查看商品現(xiàn)存數(shù)量,如果超過所設(shè)置的 下限則顯示藍色的需要禁戒,如果小于所設(shè)置的上限,則顯示紅色的需要進貨,否則的話顯示黑色的正常。 5.1.4 總收益報表測試測試進度由于功能簡單,所以只用半個時的時間對此功能進行測試。負責人安排本人。測試方法:點擊總收益報表的連接,查看總收益報表,在總收益報表中查看進貨量-出貨量是否等于現(xiàn)存量,然后(出貨價格-進貨價格)*出貨量 是否等于收益。5.2 模塊測試總結(jié)測試時進行代碼審查,從數(shù)據(jù)類型

60、,變量聲明,數(shù)據(jù)結(jié)構(gòu)進行審查,然后進行功能測試,從輸入一些簡單的數(shù)據(jù)開始執(zhí)行一遍,觀測運行期間變量的變化,運行中值的變化范圍。改變測試方案來變換另一個角度進行測試,發(fā)現(xiàn)錯誤并記錄,修改代碼,測試條件使程序通過多層分支,判別運行結(jié)果從而完成模塊測試。測試的工程讓我掌握不少的測試方法,也了解到了測試過程中能夠使用到調(diào)試技術(shù),如 采用debug調(diào)試語句,跟蹤數(shù)據(jù)、嵌入打印語句,輸出中間結(jié)果、 設(shè)置斷點,觀察程序在斷點附近的狀況。第六章 系統(tǒng)的優(yōu)缺點 該系統(tǒng)采用的事當下國內(nèi)外比較流行的b/s結(jié)構(gòu),這種結(jié)構(gòu)只安裝一個服務(wù)器端就可以了其他電腦通過瀏覽器就可以登陸進銷存系統(tǒng),遠程異地管理方便,系統(tǒng)相對比較穩(wěn)

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論