From 7a249e7d1b2e58631c19753df512a19a6e22f120 Mon Sep 17 00:00:00 2001 From: you <284908631@qq.com> Date: Fri, 5 Jun 2020 09:02:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD=EF=BC=9A=E4=B9=A6=E7=B1=8D?= =?UTF-8?q?=E8=A1=A8=E6=B7=BB=E5=8A=A0=E4=BD=9C=E8=80=85=EF=BC=8C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9=E4=B9=8B=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/admin/bookadd.jsp | 126 +++++++++++++++++++++----------- WebContent/admin/bookedit.jsp | 40 ++++++++-- WebContent/admin/booklist.jsp | 66 ++++++++++++----- src/servlet/admin/BookAdd.java | 73 ++++++++++++++++++ src/servlet/admin/BookEdit.java | 86 ++++++++++++++++++++++ 5 files changed, 321 insertions(+), 70 deletions(-) create mode 100644 src/servlet/admin/BookAdd.java create mode 100644 src/servlet/admin/BookEdit.java diff --git a/WebContent/admin/bookadd.jsp b/WebContent/admin/bookadd.jsp index fe992d6..7b16156 100644 --- a/WebContent/admin/bookadd.jsp +++ b/WebContent/admin/bookadd.jsp @@ -1,3 +1,5 @@ +<%@page import="java.sql.ResultSet"%> +<%@page import="javabean.JDBCBean"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> @@ -11,69 +13,79 @@ + -
+ <% + ResultSet librarySet = null; + ResultSet bookSortSet = null; + // 获取图书馆列表 + JDBCBean db2 = new JDBCBean(); + String librarySql = "select * from library"; + librarySet = db2.executeQuery( librarySql ); + // 获取书籍分类 + JDBCBean db3 = new JDBCBean(); + String bookSortSql = "select * from book_sort"; + bookSortSet = db3.executeQuery( bookSortSql ); + %> + +
- +
- -
-
-
- -
- +
-
辅助文字
- +
- + + <% while( librarySet.next() ){ %> + + <%} %>
-
- +
+
- - - +
- +
- +
- +
- - +
可借
+
不可借
+
- +
- +
+
- +
@@ -81,15 +93,45 @@ diff --git a/WebContent/admin/bookedit.jsp b/WebContent/admin/bookedit.jsp index 4cd9cba..5886fc9 100644 --- a/WebContent/admin/bookedit.jsp +++ b/WebContent/admin/bookedit.jsp @@ -50,6 +50,7 @@ %> + class="layui-hide">
@@ -72,7 +73,7 @@
+
@@ -116,20 +117,43 @@ @@ -50,7 +51,8 @@