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

正文內(nèi)容

學(xué)生選課管理系統(tǒng)-實(shí)訓(xùn)需求開(kāi)發(fā)指導(dǎo)書(shū)-資料下載頁(yè)

2025-01-13 14:00本頁(yè)面
  

【正文】 tion e) { ()。 } } public static void main(String[] args) { (null == ())。 }}DAO層UserDao的示例代碼如下:package 。import 。import 。import 。import 。import 。import 。import 。import 。import 。public class UserDao { Connection conn = null。 Statement st = null。 // 用戶(hù)查詢(xún) public ListUserVo getUserList() { conn = ()。 st = (conn)。 String sql = select * from user。 ListUserVo userList = new ArrayListUserVo()。 try { ResultSet rs = (sql)。 while (()) { UserVo user = new UserVo()。 ((id))。 ((code))。 ((name))。 ((address))。 ((birthday))。 ((sex))。 ((telephone))。 (())。 ((note))。 (user)。 } // 關(guān)閉數(shù)據(jù)連接 (rs)。 (st)。 (conn)。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 } return userList。 } // 利用編號(hào)或姓名進(jìn)行準(zhǔn)確查詢(xún) public ListUserVo queryUserList(String code, String name) { conn = ()。 st = (conn)。 StringBuffer sb = new StringBuffer()。 (select * from user where (1=1))。 if (name != null amp。amp。 !()) { ( and name like 39。% + name + %39。)。 } if (code != null amp。amp。 !()) { ( and code like 39。% + code + %39。)。 } String sql = ()。 ListUserVo userList = new ArrayListUserVo()。 try { ResultSet rs = (sql)。 // 循環(huán)從數(shù)據(jù)庫(kù)中取出員工信息 while (()) { UserVo user = new UserVo()。 ((id))。 ((code))。 ((name))。 ((address))。 ((birthday))。 ((sex))。 ((telephone))。 (())。 ((note))。 (user)。 } // 關(guān)閉數(shù)據(jù)連接 (rs)。 (st)。 (conn)。 } catch (SQLException e) { // TODO Autogenerated catch block ()。 } return userList。 } // 根據(jù)id查詢(xún) public UserVo getUserById(String userId) { conn = ()。 UserVo user = new UserVo()。 String sql = select * from user where id = ?。 PreparedStatement stmt = (conn, sql)。 try { (1, userId)。 ResultSet rs = ()。 while (()) { ((id))。 ((code))。 ((name))。 ((address))。 ((birthday))。 ((sex))。 ((telephone))。 (())。 ((note))。 } // 關(guān)閉數(shù)據(jù)連接 (rs)。 (stmt)。 (conn)。 } catch (SQLException e) { ()。 } return user。 } // 用戶(hù)信息修改 public boolean editUser(UserVo user) throws SQLException { boolean temp = false。 conn = ()。 String sql = update user set name=?,code=?,birthday=?,sex=?,address=?,note=?,telephone=?,=? where id=?。 PreparedStatement stmt = (conn, sql)。 (1, ())。 (2, ())。 (3, ())。 (4, ())。 (5, ())。 (6, ())。 (7, ())。 (8, ())。 (9, ())。 if (() 0) { temp = true。 } // 關(guān)閉數(shù)據(jù)連接 (stmt)。 (conn)。 return temp。 } // 用戶(hù)信息刪除 public boolean deleteUser(String userId) throws SQLException { boolean temp = false。 conn = ()。 String sql = delete from user where id=?。 PreparedStatement stmt = (conn, sql)。 (1, userId)。 if (() 0) { temp = true。 } // 關(guān)閉數(shù)據(jù)連接 (stmt)。 (conn)。 return temp。 } // 用戶(hù)信息新增 public boolean addUser(UserVo user) throws SQLException { boolean temp = false。 conn = ()。 st = (conn)。 String sql = insert into user(code,name,address,birthday,sex,telephone,,note) values(?,?,?,?,?,?,?,?)。 PreparedStatement stmt = (conn, sql)。 (1, ())。 (2, ())。 (3, ())。 (4, ())。 (5, ())。 (6, ())。 (7, ())。 (8, ())。 if (() 0) { temp = true。 } // 關(guān)閉數(shù)據(jù)連接 (stmt)。 (conn)。 return temp。 }} JSP頁(yè)面實(shí)現(xiàn) 在編寫(xiě)完后臺(tái)程序代碼之后,我們就可以編寫(xiě)前臺(tái)頁(yè)面來(lái)展示,用戶(hù)信息的列表數(shù)據(jù)項(xiàng),其頁(yè)面代碼如下:%@ page language=java import=.* pageEncoding=utf8%%@ page import=.*%%@ page import=.*%% String path = ()。 String basePath = () + :// + () + : + () + path + /。%!DOCTYPE HTML PUBLIC //W3C//DTD HTML Transitional//ENhtml head base href=%=basePath% title用戶(hù)信息/title meta equiv=pragma content=nocache meta equiv=cachecontrol content=nocache meta equiv=expires content=0 meta equiv=keywords content=keyword1,keyword2,keyword3 meta equiv=description content=This is my page link rel=stylesheet type=text/css href=css/ script language=javascript src=js//script script function find(){ =UserServlet?opt=queryUserList。 ()。 } function del(){ var obj = (39。checkbox39。)。 var len = 。 var flag = false。 for(var i=0。ilen。i++){ if(obj[i].checked==true){ flag = true。 } } if(flag){ b = (確定要?jiǎng)h除選中的記錄嗎?)。 if(true == b){ =UserServlet?opt=deleteUser。 ()。 } } else alert(39。請(qǐng)選擇要?jiǎng)h除的數(shù)據(jù)!!!39。)。 } function add(){ =./jsp/user/。 ()。 } /script /head body % List list = new ArrayList()。 if((getUserList)!=null) list =(List)(getUserList)。 % p/p p font style=fontsize: 12pt。用戶(hù)管理 用戶(hù)信息/font /p p/p form name=empForm id=empForm action= method=post table border=0 cellpadding=1 cellspacing=1 width=95% tr td align=right width=10% nowrap=true 編號(hào) /td td width=20% input type=text class=TextInput name=code /td td align=right width=10% nowrap=true 名稱(chēng) /td td width=20% input type=text class=TextInput name=name /td td width=10% amp。nbsp。input type=button class=BtnAction value=查找 onClick=find()。 /td /tr tr td align=right width=10% nowrap=true amp。nbsp。 /td td width=20% amp。nbsp。 /td td width=70% colspan=5 amp。nbsp。 /td /tr /table p/pdiv style=marginleft: 30px。 marginright: 0px table border=0 cellpadding=0 cellspacing=0 width=95% tr td width=10% input type=button class=BtnAction value=新增 onClick=add()。 /td td width=10%
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1