这是一个图书馆管理系统的jsp代码
源代码在线查看: borrowsearchresults.jsp~19~
Search Borrow Results
.style3 {font-size: 24px}
.style4 {font-size: 18px}
-->
Adduser
Modifyuser
Deletuser
Searchuser
Addbook
Deletebook
Borrowsearch
Search
Userpay
Update
Borrow Results
Serial NO.:
Sort NO.:
Title:
Borrow Date:
SReturnDate:
Return Date:
Overdate:
Fee:
ReMoney:
try{
String id = Library.getbsid();
Connection conn=Library.getConn();
Statement stmt=conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from borrowbook where id ='" + id + "'");
int number=Library.getnumber();
if(request.getParameter("next")!=null&&number ++number;
Library.setnumber(number);
for(int i=1;i if(rs.next()){
Library.setbsserialnumber(rs.getString("serialnumber"));
Library.setbssortnumber(rs.getString("sortnumber"));
Library.setbstitle(rs.getString("title"));
Library.setbsborrowdata(rs.getString("borrowdata"));
Library.setbsshouldreturndata(rs.getString("shouldreturndata"));
Library.setbsreturndata(rs.getString("returndata"));
Library.setbsoverdata(rs.getString("overdata"));
Library.setbsfee(rs.getString("fee"));
Library.setbsreturnmoney(rs.getString("returnmoney"));}
}
rs.close();
response.sendRedirect("borrowsearchresults.jsp");
}
if(request.getParameter("previous")!=null&&number>1){
--number;
Statement stmt1=conn.createStatement();
ResultSet rs1 = stmt1.executeQuery("select * from borrowbook where id ='" + id + "'");
for(int i=1;i if(rs1.next()){
Library.setbsserialnumber(rs1.getString("serialnumber"));
Library.setbssortnumber(rs1.getString("sortnumber"));
Library.setbstitle(rs1.getString("title"));
Library.setbsborrowdata(rs1.getString("borrowdata"));
Library.setbsshouldreturndata(rs1.getString("shouldreturndata"));
Library.setbsreturndata(rs1.getString("returndata"));
Library.setbsoverdata(rs1.getString("overdata"));
Library.setbsfee(rs1.getString("fee"));
Library.setbsreturnmoney(rs1.getString("returnmoney"));}
}
rs1.close();
Library.setnumber(number);
response.sendRedirect("borrowsearchresults.jsp");
}
}catch (Exception ex) {
response.sendRedirect("fail.jsp");
ex.printStackTrace();}
%>