基于JAVA超市賬單管理系統畢業設計(含源文件)_第1頁
基于JAVA超市賬單管理系統畢業設計(含源文件)_第2頁
免費預覽已結束,剩余48頁可下載查看

下載本文檔

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

文檔簡介

1、畢業設計說明書題目: 超市賬單管理系統1 PAGE * ROMAN IV超市賬單管理系統摘要: 隨著科學技術的不斷發展,計算機越來越普及,隨之各種軟件也相應而出。許許多多的企業也用上了相應的軟件,來加快自身的發展。由于超市行業的不斷壯大,也需要一套軟件來相應的軟件來管理。 在這種情況下超市賬單管理系統也應運而生。 超市賬單管理系統主要是對超市賬單、供應商、用戶的簡單管理。本系統主要用java 語言進行開發, mysql 數據庫和 Eclipse開發工具; 主要用的核心技術是Servlet,用來處理用戶的請求和頁面之間的跳轉, JDBC(Java Data Base Connectivity)連

2、接數據庫實現處理與數據庫的交互。 主要用的美工技術是 div+css ,javaScript處理頁面顯示效果。本系統能更快,更方便的管理好整個工作流程中的各個模塊,使工作效率達到最優化。關鍵詞 :java ; Servlet; div+css ; javaScript; mysql ;超市賬單管理系統;Title : Supermarket Bill Management SystemAbstract: Along with the science and technology unceasing development, the computer moreand more popular,

3、witha variety ofsoftware isout. Manycompanies also use the corresponding software, to accelerate the development of oneself. As a result of Supermarket has grown, also need a set of software to the software to management. In this case the supermarket billmanagement system also emerge as the times re

4、quire. Supermarket billmanagement system is mainly the easy management of supermarket bills, suppliers, users.This system is mainly the use of Java language development, databasemysql and Eclipse development tools; the main core technology is Servlet, It used to handle user requests andjump between

5、pages. JDB(C Java Data Base Connectivity)used to handle the interaction with the database .Mainly using artist technical is div+cs,s javaScript, handling page display effect. This system can be faster, more convenient managementof the whole working process of each module, so that the work efficiency

6、 is optimized.Keywords: java ,Servlet,div+css,javaScript,mysql,Supermarket bill management system目 錄摘 要 IAbstractII1 正文 11.1 研究背景分析 1.1.2 超市賬單管理系統的概述 2.1.3 所需軟、硬件技術準備 2.1.4 可行性分析 技術可行性 經濟可行性 社會可行性 3.2 需求分析 42.1 需求分析的任務及主要內容 具體業務的需求 4.2.2 層次圖 42.3 數據流圖 5.3 概要設計 53.1系統分

7、析 系統的總體分析 6.3.2 數據庫的設計與實現 數據庫系統分析 數據庫物理實現 7.4 詳細設計 94.1 Servlet的詳細應用 9.4.2特定模塊的詳細介紹 登陸模塊 94.2.2 賬單管理模塊 1 供應商管理模塊 2 用戶管理模塊 2 6.5 系統測試 3.3.結 語 3.4.注 釋 3.4.參考文獻 3.5.致 謝 3.7.附錄 1 3.8.1 正文研究背景分析超級市場是以顧客自選方式經營的大型綜合性零售商場,又稱自選商場。是許多國家特別是經濟發達國家的主要商品零售組織形式。超級市場于

8、 20 世紀 30 年代初最先出現在美國東部地區。我國超市市場形成于 20 世紀 90 年代初期,現在已經成為我國零售業的一種重要形態,為國民經濟的發展發揮了重要的作用。隨著超市行業的高速發展,最初的售貨員站柜臺的銷售方式已不能滿足現有的銷售業的發展,因此迫切的需要引入新的管理技術。隨著科學技術的高速發展,信息技術已經深深的影響著我國各行各業的發展。步入數字化時代,有巨大的數據信息等待著加工處理和傳輸,超市系統本就需要有一個強大的數據庫支持,這就需要對數據庫進一步的開發和利用,而對超市的銷售管理,信息的存儲和處理也顯的尤其重要。要適應如今激烈的市場競爭,就需要有高效的處理方式和管理方法,因此加

9、快超市的信息化進程是必不可少的。超市雖然具有各種優點,但當下,它仍存在零售企業所共有的落后的一面,例如:不能有效的管理每種商品、收款結算速度慢,容易出現營業差錯,不易進行商品調價,盤庫效率低,而且商品的進、銷、存不能保證同步更新,缺乏實時分析功能,管理人員對及時傳遞資料的要求始終得不到滿足。隨著超市形態的高速發展,其經營管理也變的越為復雜,數據庫的龐大支撐導 致中間流通的數據量大增,中間的商業運轉環節也越來越多,傳統的管理模式已不 能滿足,而依靠現信息技術的超市管理系統管理超市,可以節省大量的人力物力, 更重要的是能更快更穩的推動超市銷售發展,協助管理者做出與時俱進適應市場變化的正確決策,加快

10、超市經營管理效率。超市管理系統是超市對商品的信息化管理系統,本系統可以提高管理水平和工作效率,可以最大限度的減少人工操作帶來的錯誤,使用此系統主要為了實現商品 管理的穩定性、可維護性等,從而達到提高商品管理效率并指導經營方向的目的。1 PAGE 36超市賬單管理系統的概述本系統的主要功能就是完成對供應商往來賬添加的功能,每一批到貨情況, 是否付款等情況在這個管理模塊中進行記錄,并且標有記賬時間,似的數據有依可循,供隨時查詢。 此外可以根據商品的名稱查出是否記錄過, 是否已經付款的功能。實現供應商信息的添加查詢功能。本項目設計主要包括需求分析、數據庫設計、項目設計、界面設計、調試及運行等幾個大的

11、部分。工作在迭代中展開,通過不斷的完善每個環節,最終完成超市管理的需求,實現自動化辦公。經過調研的初步需求分析,得出要設計的主要模塊包括:)賬單管理模塊,主要是管理超市賬單,賬單的編號、商品名稱、商品數量、交易金額、是否付款、供應商名稱、商品描述、賬單時間。然后計算出顧客購買商品的總價,計算顧客實付金額和應付金額的差價。減少人工計算產生的錯誤。)供應商管理模塊,主要管理與超市合作的供應商,有編號、供應商名稱、供應商描述、聯系人、電話、地址。)用戶管理模塊,主要管理管理超市的用戶,有編號、用戶名稱、性別、年齡、電話、地址、權限。用戶管理信息化,減少了人力資源的浪費。所需軟、硬件技術準備本系統的開

12、發是面向數據庫應用程序的開發。目前數據庫技術發展日趨完善,可用于數據庫開發的工具各種各樣。 本系統是采用 mysql 作為后臺數據庫 ,本系統是運行在 Window XP 平臺上的,因此考慮到兼容性、開發成本以及開發的方便和簡單,本系統使用免費的Eclipse 開發平臺。為了高效、快捷的采購出庫入庫管理系統的開發。采取如下開發環境: 網絡環境:局域網。硬件環境:內存 1G,硬盤 80G。軟件環境:操作系統: Windows XP 版本。數據庫開發工具: mysql。(3)應用程序開發工具: Eclipse。技術準備:(1)java 基礎(2)jsp 技術(3)Servlet 技術(4) htm

13、l,css (5)jquery 的相關知識可行性分析技術可行性本系統戲是用 java 語言所編寫的, java 語言作為前導課程已經學過。重點學習了 jsp,最后又系統的學習了 Servlet, Servlet 這同時又是本系統應用的重點。從設計,開發,測試到最后的維護,都綜合了所學的java 知識。本系統所實現的是超市賬單管理,因此在給定的時間內完成是絕對可行。制作本系統的軟件均可以在網上 免費獲得,同時也可以獲得開源的代碼和圖片。本組的技術人員有開發此類項目的 經驗。綜上所述,此系統開發有可靠的技術支持,技術上是完全可行的。經濟可行性對本組的經濟現狀和投資能力進行分析,對系統建設運行和維護

14、費用進行估算,對系統建成后可能取得的社會和經濟效益進行估計。由于本系統是作為畢業設計由我們學生自己開發的,在經濟上的投入甚微,系統建成之后將為超市行業提供很大的方便,因此在經濟上是可行的。社會可行性本系統編程所使用的是網上的開源代碼和圖片,又不以獲利為目的。因此不必承擔任何法律責任2 需求分析2.1 需求分析的任務及主要內容具體業務的需求主要模塊包括:)賬單管理模塊,主要是管理超市賬單,賬單的編號、商品名稱、商品數量、交易金額、是否付款、供應商名稱、商品描述、賬單時間。然后計算出顧客購買商品的總價,計算顧客實付金額和應付金額的差價。減少人工計算產生的錯誤。)供應商管理模塊,主要管理與超市合作的

15、供應商,有編號、供應商名稱、供應商描述、聯系人、電話、地址。)用戶管理模塊,主要管理管理超市的用戶,有編號、用戶名稱、性別、年齡、電話、地址、權限。用戶管理信息化,減少了人力資源的浪費。2.2 層次圖軟件賬供用單應戶管商管理管理模塊理模模塊塊圖 2-1 層次圖2.3 數據流圖賬單管理登 陸數據維護經理供應商管理存入數據庫用戶管理圖 2-2登 陸賬單管理數據維護普 通 用 戶存入數據庫供應商管理圖 2-3概要設計系統分析在本系統中, 分為基本信息的賬單管理模塊, 供應商管理模塊, 用戶管理模塊。有 2 個角色:經理、普通用戶名。1用戶所具有功能經理擁有所有的模塊的操作權限,普通用戶除了對用戶管理

16、模塊的操作權限意外所有模塊的操作權限:對賬單表,供應商表增刪改查。3.1.1 系統的總體分析在前面的系統功能分析中,將系統劃分成4 個模塊,如圖 3-1 :用戶登錄普通用戶經理驗證賬單管理供應商管理用戶管理圖 3-1系統功能模塊圖數據庫的設計與實現數據庫是此類系統的核心,系統中所有的信息都存儲在數據庫中,在所有jsp 頁面中通過 JDBC與數據庫連接,操作數據庫中的數據,從而實現所有需要的功能。數據庫軟件有很多。本系統中數據庫采用MySQL作為數據庫工具。數據庫是網站的核心,數據庫設計的合理與否對網站的建設有著至關重要的影響。一個良好的數據庫開發過程一般是先系統分析,再邏輯設計,然后物理實現。

17、系統分析中分析數據庫用戶需求,并畫出 E-R圖直觀地表示出數據庫系統的需求。邏輯設計中根據系統分析設計的一個關系模型。 物理設計為邏輯設計中的數據模型選取一個最合理的應用環境的物理結構,通常選取一個常用數據庫軟件,用數據庫軟件創建與邏輯設計中數據模型對應的數據庫。數據庫系統分析本系統的數據庫實體主要有“賬單” 、“供應商”、“用戶”。其中“賬單”中的物品與“供應商”存在著聯系,一個賬單必須對應一個供應商,但供應商不一定只有 一份賬單,即供應商和賬單之間一多對多的關系。如圖:3-1賬單M擁有1供應商圖 3-1賬單供應商E-R 圖數據庫物理實現經過數據庫系統分析后,數據庫的結構已經非常清晰,剩下的

18、就是用一種數據 庫軟件實現這樣的結構。本系統中數據庫采用MySQL 作為數據庫。首先我們在MySQL 中建一個數據庫,命名為“ supermarket”。 選中 supermarket數據庫,向數據庫中添加 3 個表: gongyingshang ,yonghu, zhangdan。下面是每個數據表中的屬性。gongyingshang 表。gongyingshang 表用來存儲供應商信息。gongyingshang表字段名稱數據類型gys_id數字gys_name文本gys_miaoshu文本gys_lianxiren文本gys_phone文本gys_chuanzhen數字gys_addres

19、s數字表 3-1yonghu 表。yonghu 表用來存儲領登陸用戶明細。yonghu表字段名稱數據類型yh_id數字yh_username文本yh_password文本yh_sex文本yh_age數字yh_phone數字yh_address文本yh_quanxian文本表 3-2zhangdan 表。zhangdan 表用來存儲賬單的信息。zhangdan字段名稱表數據類型zd_idzd_spmingcheng數字文本zd_spshuliang數字zd_jymoney數字zd_sfzhifu文本zd_gysname文本zd_spmiaoshu文本zd_data文本zd_danwei文本表 3

20、-3詳細設計Servlet 的詳細應用在 Servlet工作流程中, 根據 web.xml 中的配置將攔截所有通過 servlet的請求,并根據 URI 決定分發給 doGet 還是 doPost 處理請求,然后調用相應的業務邏輯方法,調用相應的頁面去執行響應。利用JDBC(Java Data Base Connectivity)技術處理與數據庫連接,利用其 ServletAPI 所定義的接口和類來封裝與數據庫交互的相關操作,使對數據庫的操作變得相當容易,減少開發時間,而且能對系統進行靈活的設計和實現,使系統的各模塊容易維護和重用。特定模塊的詳細介紹每個包都有其各自的作用, 是雜亂的 java

21、 文件分層, 具有層次感, 也可以很好地進行維護。登陸模塊輸入不同的角色名就會進入不同的模塊,并完成相應的功能;登陸模塊如圖4-1 所示如圖 4-1代碼: public class HandelLogin extends HttpServlet UserOper oper=new UserOper();public void init(ServletConfig config)throws ServletException super.init(config);public void destroy() super.destroy();public void doGet(HttpServlet

22、Request request, HttpServletResponse response) throws ServletException, IOException this.doPost(request, response);public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOExceptionrequest.setCharacterEncoding(utf-8); response.setCharacterEncoding(utf-8);

23、response.setContentType(text/html;charset=utf-8); HttpSession session=request.getSession(true); String op = request.getParameter(op);String opg= request.getParameter(opg); String opyh = request.getParameter(opyh);String zdgroup=request.getParameter(zdgroup); System.out.println(zdgroup);String gysgro

24、up=request.getParameter(gysgroup); Login judgeLogin = (Login)(session.getAttribute(login); if (doLogin.equals(op) doLogin(request, response);return;if (judgeLogin!=null&!.equals(judgeLogin)if( 經理.equals(judgeLogin.getYh_quanxian()if (ZD.equals(op)doLnquiresZD(request,response); else if(ZDAdd.equals(

25、op) doZDAdd(request,response); else if(ZDXinXi.equals(op)doZDXinXi(request,response); else if( 修 改.equals(op)doZDXiuGai(request,response); else if( 刪 除.equals(op)doZDDel(request,response); else if( 組合查詢 .equals(zdgroup) doZDChaXun(request,response); else if(GYS.equals(op)doLnquiresGYS(request,respon

26、se); else if(GYSAdd.equals(op)doGYSAdd(request,response); else if(GYSXinXi.equals(op) doGYSXinXi(request,response); else if( 修 改 .equals(opg) doGYSXiuGai(request,response); else if( 刪 除 .equals(opg) doGYSDel(request,response); else if( 組 合 查 詢 .equals(gysgroup) doGYSChaXun(request,response); else if

27、(YH.equals(op)doLnquiresYH(request,response); else if(YHAdd.equals(op)doYHAdd(request,response); else if(YHXinXi.equals(op) doYHXinXi(request,response); else if( 修 改.equals(opyh)doYHXiuGai(request,response); else if( 刪 除 .equals(opyh) doYHDel(request,response); else if( 查 詢 .equals(opyh) doYhChaXun(

28、request,response); else if( 修 改 密 碼 .equals(opyh) doYHMiMa(request,response); else if( 修 改 密 碼 .equals(op) doAdminMiMaXiuGai(request,response);if( 普通用戶 .equals(judgeLogin.getYh_quanxian()if (ZD.equals(op)doLnquiresZD(request,response);.equals(opyh)|.equals(opyh)| else if(ZDAdd.equals(op) doZDAdd(req

29、uest,response); else if(ZDXinXi.equals(op)doZDXinXi(request,response); else if( 修 改.equals(op)doZDXiuGai(request,response); else if( 刪 除.equals(op)doZDDel(request,response); else if( 組合查詢 .equals(zdgroup) doZDChaXun(request,response); else if(GYS.equals(op)doLnquiresGYS(request,response); else if(GY

30、SAdd.equals(op) doGYSAdd(request,response); else if(GYSXinXi.equals(op) doGYSXinXi(request,response); else if( 修 改 .equals(opg) doGYSXiuGai(request,response); else if( 刪 除 .equals(opg) doGYSDel(request,response); else if( 組 合 查 詢 .equals(gysgroup) doGYSChaXun(request,response); else if(YH.equals(op)

31、| 修 改 密 碼 .equals(op)| 修 改 密 碼 查 詢 .equals(opyh)| 刪除 .equals(opyh)| 修改YHXinXi.equals(op)|YHAdd.equals(op) Information info=new Information();String msg=對不起您沒有那么高的權限 ;info.setMsg(msg);request.setAttribute(info, info);request.getRequestDispatcher(mainWindow.jsp).forward(request, response);elseresponse

32、.sendRedirect(login.jsp);管理員(用戶)登陸以后就會進入總頁面如圖:4-2 所示:在左側可以看到管理員進來后(普通用戶)各自的權限。管理員登陸:如圖 4-2普通用戶登陸:如圖 4-3賬單管理模塊管理員權限下的功能操作及代碼如圖 4-4代碼:private void doLnquiresZD(HttpServletRequest request,HttpServletResponse responseth) rows ServletException,IOException HttpSession session=request.getSession();List lis

33、t= oper.ZDLnquires(); List gysName=oper.ZDGongYiShang(); if(list!= null)request.setAttribute(list , list); session.setAttribute(gysName, gysName);request.getRequestDispatcher(admin_bill_list.jsp ).forward(request,response);return ; elseresponse.sendRedirect(admin_bill_list.jsp );private void doZDCha

34、Xun(HttpServletRequest request,HttpServletResponse responseth) rows ServletException,IOException String zd_spmingcheng=request.getParameterc(ommodityname); String zd_sfzhifu=request.getParameter(payment); System.out.println(zd_spmingcheng);System.out.println(zd_sfzhifu);List list= oper.ZDChaXun(zd_s

35、pmingcheng,zd_sfzhifu);if(list!= null)request.setAttribute(list , list); request.getRequestDispatcher(admin_bill_list.jsp ).forward(request,response);return ; elseresponse.sendRedirect(admin_bill_list.jsp );代碼:private void doZDAdd(HttpServletRequest request,HttpServletResponse responseth) rows Servl

36、etException,IOException String zd_id=request.getParameter(zdid ).trim();String zd_spmingcheng=request.getParameterz(dproductname).trim(); String zd_spshuliang=request.getParameterz(dtransnunber).trim(); String zd_jymoney=request.getParameter(zdtransmoney).trim(); String zd_sfzhifu=request.getParamet

37、er(payment).trim();String zd_gysname=request.getParameterz(dproducmanufacture).trim(); String zd_spmiaoshu=request.getParameterz(dproducdesc).trim();String zd_danwei=request.getParameterz( dtransunits).trim();String zd_data=new SimpleDateFormat(yyyy-MM-dd ).format( newDate().getTime();List params =

38、new ArrayList(); params.add(zd_id); params.add(zd_spmingcheng); params.add(zd_spshuliang); params.add(zd_jymoney); params.add(zd_sfzhifu); params.add(zd_gysname); params.add(zd_spmiaoshu); params.add(zd_data); params.add(zd_danwei);response);Information info= oper.ZDAdd(params); request.setAttribute

39、(info , info);request.getRequestDispatchera( dmin_bill_add.jsp ).forward(request,代碼:private void doZDXinXi(HttpServletRequest request,HttpServletResponse responset)hrows ServletException,IOException String zd_id =request.getParameter(id );ZDBean zdbean =new ZDBean();zdbean=oper.ZDXinXi(zd_id);if(zdb

40、ean!=null) request.setAttribute(zdbean, zdbean);request.getRequestDispatcher(admin_bill_update.jsp).forward(request,response);如圖 4-5代碼:private void doZDXiuGai(HttpServletRequest request,HttpServletResponse responseth) rows ServletException,IOException String zd_id=request.getParameter(zdid ).trim();

41、String zd_spmingcheng=request.getParameterz(dproductname).trim(); String zd_spshuliang=request.getParameterz(dtransnunber).trim(); String zd_jymoney=request.getParameter(zdtransmoney).trim(); String zd_sfzhifu=request.getParameter(payment).trim();String zd_gysname=request.getParameterz(dproducmanufa

42、cture).trim();String zd_spmiaoshu=request.getParameterz(dproducdesc).trim(); String zd_danwei=request.getParameterz( dtransunits).trim();List params = new ArrayList(); params.add(zd_id); params.add(zd_spshuliang); params.add(zd_jymoney); params.add(zd_sfzhifu); params.add(zd_gysname); params.add(zd_

43、spmiaoshu); params.add(zd_danwei); params.add(zd_spmingcheng); Information info= oper.ZDXiuGai(params); request.setAttribute(info , info);request.getRequestDispatcher(admin_bill_update.jsp).forward(request, response);private void doZDDel(HttpServletRequest request,HttpServletResponse responseth) row

44、s ServletException,IOException String zd_id=request.getParameter(zdid ).trim();Information info= oper.ZDDel(zd_id); request.setAttribute(info , info);request.getRequestDispatcher(admin_bill_update.jsp).forward(request,response);普通用戶權限下功能操作及代碼:圖及代碼同經理權限下圖及代碼4.2.2 供應商管理模塊管理員權限下的功能操作及代碼如圖: 4-6 所示如圖 4-6

45、代碼:private void doGYSChaXun(HttpServletRequest request,HttpServletResponse responset)hrows ServletException,IOException String gys_name=request.getParameterc(ommodityname).trim(); String gys_miaoshu=request.getParameterc(ommoditymiaoshu).trim(); List list= oper.GYSChaXun(gys_name,gys_miaoshu); if(li

46、st!= null)response);request.setAttribute(list , list);request.getRequestDispatchera( dmin_supplier_list.jsp).forward(request, elseresponse.sendRedirect(admin_supplier_list.jsp);private void doLnquiresGYS(HttpServletRequest request,HttpServletResponse responseth) rows ServletException,IOException Lis

47、t list= oper.GYSLnquires();if(list!= null)request.setAttribute(list , list);request.getRequestDispatchera( dmin_supplier_list.jsp).forward(request,response); elseresponse.sendRedirect(admin_supplier_list.jsp);如圖 4-7代碼:private void doGYSAdd(HttpServletRequest request,HttpServletResponse responset)hro

48、ws ServletException,IOException String gys_id = request.getParameter(gysid).trim();String gys_name =request.getParameterg(ysname).trim(); String gys_miaoshu=request.getParameterg(ysmiaoshu).trim(); String gys_lianxiren=request.getParameter(gyslianxi ).trim(); String gys_phone=request.getParameterg(y

49、sphone).trim();String gys_chuanzhen=request.getParametegr(yschuanzhen).trim(); String gys_address=request.getParametegr(ysaddress).trim();List params = new ArrayList(); params.add(gys_id); params.add(gys_name); params.add(gys_miaoshu); params.add(gys_lianxiren); params.add(gys_phone); params.add(gys

50、_chuanzhen); params.add(gys_address);Information info= oper.GYSAdd(params);request.setAttribute(info , info);request.getRequestDispatchera( dmin_supplier_add.jsp).forward(request,response);如圖 4-8代碼:private void doGYSXinXi(HttpServletRequest request,HttpServletResponse responseth) rows ServletExcepti

51、on,IOException String gys_id = request.getParameter(id );GYSBean gysbean=new GYSBean();gysbean =oper.GYSXinXi(gys_id);response);request.setAttribute(gysbean, gysbean);request.getRequestDispatchera( dmin_supplier_update.jsp).forward(request,如圖 4-9代碼:private void doGYSXiuGai(HttpServletRequest request

52、,HttpServletResponse responset)hrows ServletException,IOException String gys_id= request.getParameter(gysid ).trim();String gys_miaoshu = request.getParameterg( ysmiaoshu).trim();String gys_lianxiren=request.getParameter(gyslianxi ).trim(); String gys_phone=request.getParameterg( ysphone).trim();Str

53、ing gys_chuanzhen=request.getParameterg(yschuanzhen).trim(); String gys_address=request.getParameterg(ysaddress).trim(); String gys_name=request.getParameterg( ysname).trim();List params=new ArrayList(); params.add(gys_id); params.add(gys_miaoshu); params.add(gys_lianxiren); params.add(gys_phone); p

54、arams.add(gys_chuanzhen); params.add(gys_address); params.add(gys_name);Information info= oper.GYSXiuGai(params);request.setAttribute(info , info); request.getRequestDispatcher(admin_supplier_update.jsp).forward(request,response);private void doGYSDel(HttpServletRequest request,HttpServletResponse r

55、esponset)hrows ServletException,IOException String gys_id= request.getParameterg( ysid ).trim();Information info= oper.GYSDel(gys_id);request.setAttribute(info , info);request.getRequestDispatchera( dmin_supplier_update.jsp).forward(request,response);普通用戶權限下功能操作及代碼:圖及代碼同經理權限下的圖及代碼4.2.3 用戶管理模塊管理員權限下的

56、功能操作及代碼如 圖 4-10代碼:private void doGYSChaXun(HttpServletRequest request,HttpServletResponse responset)hrows ServletException,IOException String gys_name=request.getParameterc(ommodityname).trim(); String gys_miaoshu=request.getParameterc(ommoditymiaoshu).trim(); List list= oper.GYSChaXun(gys_name,gys_

57、miaoshu); if(list!= null)request.setAttribute(list , list);request.getRequestDispatchera( dmin_supplier_list.jsp).forward(request,response); elseresponse.sendRedirect(admin_supplier_list.jsp);private void doLnquiresYH(HttpServletRequest request,HttpServletResponse responset)hrows ServletException,IO

58、Exception List list= oper.YHLnquires();response);if(list!= null)request.setAttribute(list , list); request.getRequestDispatcher(admin_user_list.jsp).forward(request, elseresponse.sendRedirect(admin_user_list.jsp);如 圖 4-11代碼:private void doYHAdd(HttpServletRequest request,HttpServletResponse response

59、th) rows ServletException,IOException String yh_id=request.getParameter(yhid ).trim();String yh_username= request.getParametery(hname).trim(); String yh_password=request.getParametery(hpassword).trim();response);String yh_sex=request.getParametery( hsex).trim(); String yh_age=request.getParametery(h

60、age).trim(); String yh_phone=request.getParametery( hphone).trim();String yh_address=request.getParametery(haddress).trim(); String yh_quanxian=request.getParametery( hquanxian).trim(); List params = new ArrayList();params.add(yh_id); params.add(yh_username); params.add(yh_password); params.add(yh_s

溫馨提示

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

評論

0/150

提交評論