freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于jsp的小型超市信息管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)(文件)

 

【正文】 ember)。}}說(shuō)明:login方法,接受前臺(tái)頁(yè)面?zhèn)鬟f過(guò)來(lái)的用戶名與密碼,并利用編碼轉(zhuǎn)換類將用戶名轉(zhuǎn)換為UTF8編碼類型,解決了亂碼問(wèn)題。 Login.()public Member login(Member member)throws SQLException{ String sql=select * from member where MemberName=? and MemberPassword=?。ResultSet rs=()。((MemberPassword))。return member1。并實(shí)例化member類,將結(jié)果集中的數(shù)據(jù)輸出,返回Member類型。接受到Flag=1 ,調(diào)用FindAll()方法,查詢MysqL數(shù)據(jù)庫(kù)中g(shù)oods表,查詢所有商品信息,返回一個(gè)ListGoods 集合,名為list。將request 范圍內(nèi)的“goods”接收并進(jìn)行強(qiáng)制類型轉(zhuǎn)換。id=%=(i).getID()%”。list=(ListGoods)(goods)。id=%=(i).getID()%刪除/a/td tda href=?flag=5amp。(req, response)。try{Connection conn。rs=(sql)。((GoodsName))。((GoodsAmount))。(good)。}相關(guān)頁(yè)面設(shè)計(jì)見(jiàn)圖58,59,510。系統(tǒng)根據(jù)XML配置文件,調(diào)用CartController 中的add方法,代碼如下:public void add(int id,HttpServletRequest request, HttpServletResponse response){try{ ().setAttribute(Amounterror, )。for(int i=0。Goods g=(id)。(())。 (request, response)。然后重新實(shí)例化一個(gè)Shoppingcart ,將顧客選中的商品信息存入list中重新存入session中。 % table tr td width=608% if(()==0){% 您未購(gòu)買任何商品。% tr td%=() %/td td%=() %/td tdinput type=text value=%=()% name=num /td td%=()*() %/td tda href=?flag=3amp。添加商品至購(gòu)物車時(shí),會(huì)對(duì)購(gòu)物車中的商品進(jìn)行校驗(yàn),若商品已在購(gòu)物車中,則不在購(gòu)物車中添加新項(xiàng)目,而是只修改商品數(shù)量。結(jié)賬成功后,則對(duì)數(shù)據(jù)庫(kù)中的商品余量進(jìn)行修改,自動(dòng)減去顧客購(gòu)買的商品數(shù)量。int exitNum=0。i++){if((i).getID()==id){exitNum=(i).getAmount()。(())。(sc)。}catch(Exception e){()。若是第一次購(gòu)買此物品,則默認(rèn)商品數(shù)量初始值為1。ListShoppingcart lsc=new ArrayListShoppingcart()。((i))。(i).setAmount((num[i]))。(request, response)。如果發(fā)現(xiàn)消費(fèi)者購(gòu)買的商品數(shù)量大于庫(kù)存時(shí),則不允許其購(gòu)買,并在界面上輸出相應(yīng)錯(cuò)誤信息。i()。(request, response)。缺少了功能性模塊的支持,實(shí)現(xiàn)業(yè)務(wù)邏輯就無(wú)從談起。private static String psw=123456。characterEncoding=UTF8。}return con。return str。import 。return Accountcode。private String Input_Name。private int Input_Amount。public Input() {super()。Input_Name = input_Name。Input_Amount = input_Amount。}public int getInputID() {return InputID。}public String getInput_Name() {return Input_Name。}public int getInput_Price() {return Input_Price。}public int getInput_Amount() {return Input_Amount。}public int getInput_MaintainTime() {return Input_MaintainTime。}}進(jìn)貨單控制類():package controller。import 。import 。public class InputController extends HttpServlet {private InputDAO inputdao=new InputDAO()。break。}}} public void selectAll(HttpServletRequest request, HttpServletResponse response){try{ListInputlist=()。}catch(Exception e){()。}}public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {int flag=((flag))。GoodsDAO gooddao=new GoodsDAO()。(price)。Int maintaintime=((GoodsMaintainTime))。 }else{(name, goodstype, price, purchaseprice, amount, gettime, maintaintime, factory)。(request, response)。createInput方法從前臺(tái)接受數(shù)據(jù),并調(diào)用GoodsDAO的checkExist方法,按照商品名對(duì)數(shù)據(jù)庫(kù)進(jìn)行查找。黑盒測(cè)試法(又稱功能測(cè)試),是把系統(tǒng)看成一個(gè)黑盒子,完全不考慮程序內(nèi)部結(jié)構(gòu)和代碼,是在程序接口進(jìn)行的測(cè)試。本次測(cè)試從兩方面進(jìn)行。普通顧客測(cè)試用例見(jiàn)表52所示。小型超市信息管理系統(tǒng)的界面友好度還有待提升,用戶體驗(yàn)尚需完善。雖然可以通過(guò)操作者的人為控制避免這些失誤,但系統(tǒng)的穩(wěn)定性,代碼強(qiáng)度都受到了影響。數(shù)據(jù)庫(kù)沒(méi)有用到連接池技術(shù),難以滿足段時(shí)間內(nèi)大量的訪問(wèn)鏈接以及對(duì)數(shù)據(jù)庫(kù)的操作,亟待改善。總結(jié)前面的各項(xiàng)設(shè)計(jì)與分析成果,我們可以得到以下結(jié)論:小型超市的基本功能已經(jīng)實(shí)現(xiàn),可以滿足正常經(jīng)營(yíng)的需要。管理員登錄測(cè)試如表 51所示。白盒測(cè)試法(又稱結(jié)構(gòu)測(cè)試),是把程序看做裝在一個(gè)透明的白盒子里,也就是在完全了解程序結(jié)構(gòu)和代碼的前提下,按照程序內(nèi)部的邏輯測(cè)試程序,檢驗(yàn)程序中的每條通路是否都能按照預(yù)定要求正確工作。系統(tǒng)測(cè)試是將已經(jīng)確認(rèn)的軟件,完成的代碼,計(jì)算機(jī)硬件,網(wǎng)絡(luò)等其他元素結(jié)合在一起,進(jìn)行系統(tǒng)的各種組裝測(cè)試和確認(rèn)測(cè)試。 }說(shuō)明:進(jìn)貨單模塊是超市信息管理系統(tǒng)中很重要的一個(gè)組成部分。} (id,name, goodstype, price, purchaseprice, amount, gettime, maintaintime, factory)。int id=(name)。int amount=((GoodsAmount))。int goodstype=((GoodsType))。}}} public void createInput(HttpServletRequest request, HttpServletResponse response){try{ ToChinese to=new ToChinese()。()。RequestDispatcher rd=()。deleteByID(id,request,response)。}public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {int flag=((flag))。import 。import 。import 。}public String getInput_Factory() {return Input_Factory。}public String getInput_GetTime() {return Input_GetTime。}public int getInput_PurchasePrice() {return Input_PurchasePrice。}public int getInput_Type() {return Input_Type。}public int getInput_GoodsID() {return Input_GoodsID。Input_MaintainTime = input_MaintainTime。Input_Price = input_Price。InputID = inputID。private int Input_MaintainTime。private int Input_Price。public class Input {private int InputID。public class CodeCreator {public CodeCreator(){}public String createAccountcode(){SimpleDateFormat sdf=new SimpleDateFormat(yyyyMMddHHmmss)。}return。public class ToChinese {public ToChinese(){}public static String tochinese(String str){try{if(str==null){return。con=(url)。password=+psw+amp。數(shù)據(jù)庫(kù)連接類():public class DBConnector {private Connection con。}}相關(guān)頁(yè)面設(shè)計(jì)見(jiàn)圖512,圖513,圖514。}}().setAttribute(ShoppingCart, list)。 ()方法:public void removecart(int id,HttpServletRequest request, HttpServletResponse response){try{ListShoppingcart list=(ListShoppingcart)().getAttribute(ShoppingCart)。}}說(shuō)明:此方法用來(lái)修改購(gòu)物車中商品的數(shù)量。}}().setAttribute(ShoppingCart, lsc)。}else{String error=商品數(shù)量不能大于余量。i()。 try{GoodsDAO gooddao=new GoodsDAO()。如果購(gòu)物車中已經(jīng)存在此商品,則將購(gòu)物車中的商品數(shù)量信息單獨(dú)保存,并從購(gòu)物車中刪除此商品的信息。RequestDispatcher rd=()。(exitNum+1)。 } }Shoppingcart sc=new Shoppingcart()。for(int i=0。圖511 購(gòu)物車模塊流程圖()方法:public void add(int id,HttpServletRequest request, HttpServ
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1