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

正文內(nèi)容

網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn)畢業(yè)論文正文-閱讀頁

2024-09-17 00:30本頁面
  

【正文】 { if(totalPages0) pageNo = totalPages。 } } try { ResultSet rs = null。 if(username!=nullamp。!()){ ( where username like 39。)。 rs = (())。 while(()){ users = new Users()。 ((psw))。 ((capacity))。 (users)。 } catch (SQLException e) { ()。 (conn)。 } 獲得符合結(jié)果的記錄條數(shù) public int getTotalRecords(String strPageNo,String username){ int totalRecords =0。 Statement stmt = (conn)。 try { StringBuffer buffer = new StringBuffer(select count(*) from userinfo )。amp。%+username+%39。 } rs = (())。 }else{ totalRecords =0。 }finally{ (rs)。 (conn)。 } 獲得符合查詢結(jié)果的記錄顯示的頁數(shù) public int getTotalPages(int totalRecords){ int totalPages = totalRecords % pageSize == 0 ? totalRecords / pageSize : totalRecords / pageSize + 1。 } 獲得一個用戶對象,包含該用戶所有信息 public Users getUsers(String username){ Connection conn = ()。 Users users = null。 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 27 String sql = select * from userinfo where username= 39。 rs = (sql)。 ((id))。 ((username))。 ((phone))。 } catch (SQLException e) { ()。 (conn)。 } } 圖書 管理 模塊 該模塊分為 增加圖書,修改圖書信息,刪除圖書,查詢圖書 圖書 已管理員身份登錄,點(diǎn)擊增加圖書如圖 圖 查詢圖書界面 其部分代碼如下: public int addBook(String bookname,String author,String publish,String isbn,String price,String num,String category,String contents){ int result = 1。 try { 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 28 String sql = insert into bookinfo (bookname,author,publish,isbn,price,num,category,contents) values (?,?,?,?,?,?,?,?)。 (1, bookname)。 (3, publish)。 (5, price)。 (7, category)。 ()。 return result。 result = 0。 } finally { (conn)。 Statement stmt = (conn)。+id+39。 }catch (Exception e) { ()。 (conn)。 Connection conn = ()。 PreparedStatement pstmt = (sql)。 (2, author)。 (4,isbn)。 (6,num)。 (8,contents)。 ()。 return result。 result = 0。 } finally { (conn)。 Connection conn = ()。 ResultSet rs = null。 if(bookname!=nullamp。!()){ ( and bookname like 39。)。amp。%+category+%39。 } if(author!=nullamp。!()){ ( and author like 39。)。amp。%+publish+%39。 } if(isbn!=nullamp。!()){ ( and isbn like 39。)。amp。 floatmoney = (sprice)。 (39。)。amp。 floatmoney = (fprice)。 (39。)。 if(()){ totalRecords = (1)。 } }catch(SQLException e) { ()。 (stmt)。 }return totalRecords。 return totalPages。 Statement stmt = (conn)。 try { ResultSet rs = null。 rs = (sql)。 ((id))。 ((author))。 ((isbn))。 ((num))。 ((contents))。 } catch (SQLException e) { ()。 (conn)。 } } 訂單 管理 模塊 該模塊分為 刪除 訂單 ,查詢 訂單。 Statement stmt = (conn)。 int bookid = 0。 String sql1 = select num,bookid from orderinfo where id=39。 rs = (sql1)。 bookid = (bookid)。 PreparedStatement pstmt = (sql2)。 (2, bookid)。 String sql3 = delete from orderinfo where id=39。 (sql3)。 (pstmt)。 } finally { (stmt)。 } } 由于點(diǎn)擊訂單管理就直接跳轉(zhuǎn)到圖 ,功能與其他模塊功能相近,在此就不做過多的說明了。 點(diǎn)擊左側(cè) 增加促銷活動 ,頁面跳轉(zhuǎn)至 增加促銷活動 ,如圖 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 35 圖 增加促銷活動界面 其部分代碼如下: public int addAct(String title,String contents,String stime,String ftime){ int result = 1。 try { String sql = insert into actinfo (title,contents,stime,ftime,createdtime) values (?,?,?,?,getdate())。 (1, title)。 (3, stime)。 ()。 return result。 result = 0。 } finally { (conn)。 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 36 圖 刪除促銷活動界面 圖 刪除促銷活動界面 其部分代碼如下: public void delAct(String id){ Connection conn = ()。 try { String sql = delete from actinfo where id=39。 (sql)。 } finally { (stmt)。 } } 點(diǎn)擊左側(cè) 查詢促銷活動 ,頁面跳轉(zhuǎn)至 查詢促銷活動 ,如圖 ,輸入條件點(diǎn)擊右側(cè)查詢按鈕,頁面跳轉(zhuǎn)至如圖 ,點(diǎn)擊 id鏈接,頁面跳轉(zhuǎn)至如圖 。 Connection conn = ()。 ResultSet rs = null。 if(title!=nullamp。!()){ ( and title like 39。)。amp。amp。amp。 if((1)) ()。 if((3)) ()。+stime+39。 } if(operater2!=nullamp。!()amp。ftime!=nullamp。!()){ ( and ftime)。 if((2)) (=)。 (39。)。 if(()){ totalRecords = (1)。 } }catch(SQLException e) { ()。 (stmt)。 }return totalRecords。 return totalPages。 Statement stmt = (conn)。 try { ResultSet rs = null。 rs = (sql)。 ((title))。 ((stime))。 ((id))。 } (rs)。 }finally{ (stmt)。 }return act。 留言 點(diǎn) 擊上面留言簿,頁面跳轉(zhuǎn)至刪除留言界面,點(diǎn)擊右側(cè)刪除按鈕,彈出對話框,提示是否刪除如圖 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 40 圖 刪除留言簿界面 其部分代碼如下: public void delComment(String id){ Connection conn = ()。 try { String sql = delete from ment where id=39。 (sql)。 } finally { (stmt)。 } } 點(diǎn)擊上面留言簿,頁面跳轉(zhuǎn)至如圖 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 41 圖 查看留言簿界面 其部分代碼如下: public ListComment getCommentsList(String strPageNo,int totalPages){ int pageNo = 0。 Statement stmt = (conn)。 if (strPageNo == null || ()) { pageNo = 1。 } catch (NumberFormatException e) { pageNo = 1。 } if (pageNo totalPages){ if(totalPages0) pageNo = totalPages。 } } try { ResultSet rs = null。 rs = (sql)。 while(()){ ment = new Comment()。 ((sendname))。 ((createdtime))。 } (rs)。 }finally{ (stmt)。 }return mentList。 Connection conn = ()。 ResultSet rs = null。 rs = (sql)。 }else{ totalRecords =0。 }finally{ (rs)。 (conn)。 } 獲得符合查詢結(jié)果的記錄顯示的頁數(shù) public int getTotalPages(int totalRecords){ int totalPages = totalRecords % pageSize == 0 ? totalRecords / pageSize : totalRecords / pageSize + 1。 } } 網(wǎng)絡(luò)書店的設(shè)計與實(shí)現(xiàn) 43
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1