软件图书管理系统,关联图+DFD图+实体属性图+ER图
document.all.txt_edit.value = "";
          document.all.txt_page.value = "1";
          document.all.form1.action = "index.jsp?bm=1";
          document.all.form1.submit();
   }
//跳转到最后一页的函数
   function lastpg()
   {
          document.all.txt_type.value = "<%=strType%>";
          document.all.txt_type1.value = "<%=strType1%>";
          document.all.txt_id.value = "";
          document.all.txt_edit.value = "";
          document.all.txt_page.value = "<%=t%>";
          
          document.all.form1.action = "index.jsp?bm="+<%=t%>;
          document.all.form1.submit();
   }
//跳转到下一页的函数
   function nextpg()
   {
          document.all.txt_type.value = "<%=strType%>";
          document.all.txt_type1.value = "<%=strType1%>";
          document.all.txt_id.value = "";
          document.all.txt_edit.value = "";
          document.all.txt_page.value = "<%=s%>";
          document.all.form1.action = "index.jsp?bm="+<%=s%>;
          document.all.form1.submit();
   }
   function finalpg()
   {
          document.all.txt_type.value = "<%=strType%>";
          document.all.txt_type1.value = "<%=strType1%>";
          document.all.txt_id.value = "";
          document.all.txt_edit.value = "";
          document.all.txt_page.value = "<%=sum%>";
          document.all.form1.action = "index.jsp?bm="+<%=sum%>;
          document.all.form1.submit();
   }
   function checkdata()
   {
          if (checkd()) return true;
          document.all.bm.value="";
          return false;
   }
//判断输入的是不是数字
   function checkd()
   {
          if(!isDigit(document.all.bm.value))
          {
                 alert("输入的页码不是数字!");
                 return false;
          }
          if(document.all.bm.value=="")
          {
                 alert("请输入页码!");
                 return false;
          }
          else
          {
                 var t = document.all.bm.value;
                 var cur = <%=cur%>;
                 var sum = <%=sum%>;
                 if(t<1||t>sum)
                 {
                        alert("请跳至1和"+sum+"之间!");
                        return false;
                 }
          }
          document.all.txt_page.value = document.all.bm.value;
          return true;
   }
   document.all.txt_page.value = "";
</script>
<%
   myBean.closeConn();
%>
图书归还界面图如图4.2所示
关于还书的Java代码:
//还书,参数为索取号
   public int[] backBorrow(String sqh)
   {
          System.out.println("批量处理还书。。。。。");
          String sql="";
          String strBOOKID=ds.toString((String)toName("KJB2_KJXX_STORE","SQH","BOOKID",sqh));
          String strNow = ds.getDateTime();
          strNow = strNow.substring(0,10);
          createStatement();
             closeStm();
          return result;
   }
   //根据所还书的索取号取得,此书的信息和是否过期等信息
   public Hashtable checkBook(String sqh)
   {
          String sql="";
          String strBOOKID=ds.toString((String)toName("KJB2_KJXX_STORE","SQH","BOOKID",sqh));
          if(strBOOKID.equals("")) strBOOKID="-1";
          String strBOOKCLASSID=ds.toString((String)toName("KJB2_KJXX_STORE","SQH","BOOKCLASSID",sqh));
          if(strBOOKCLASSID.equals("")) strBOOKCLASSID="-1";
          sql="select TITLE,AUTHOR,ISBN,CBSJ,DJ,PCJE,READERID,JYSJ,DQSJ "
                 +" from KJB2_KJXX_BOOK,KJB2_KJXX_JYB "
                 +" where KJB2_KJXX_BOOK.BOOKCLASSID="+strBOOKCLASSID+" and KJB2_KJXX_JYB.BOOKID="+strBOOKID+" and KJB2_KJXX_JYB.ZT='"+strZero+"'";
          return searchOneData(sql);
   }
归还的JSP代码:
调用的JavaBean为kjb2.library.bean.BorrowBean。
<jsp:useBean id="myBean" scope="page" class="kjb2.library.bean.BorrowBean"/>
界面的JSP代码:
<div align=center>
<hr>
    <table  width="100%" cellspacing=1 cellpadding=0 class="tbg" align=center>
          <tr><td  align="center" class=bgtable colspan=2 style="font:bold 20px"><br><br></td></tr>
   </table>
   <br>
<table width="100%" cellspacing=1 cellpadding=0 class="tbg">
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>