<%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030" import="java.sql.*"%> Insert title here
 
车位添加
  车位编号:
  车位类型:
  车位状态:
  车位位置:
                
<% int CountPage = 0; int CurrPage = 1; int PageSize = 12; int CountRow = 0; String StrPage = request.getParameter("Page"); if (StrPage == null) { CurrPage = 1; } else { CurrPage = Integer.parseInt(StrPage); } Connection con=gg.getCon(); if (con != null) { try { String sqlyy = "Select * from chewei "; ResultSet rs=gg.GetRs(sqlyy); if(!rs.next()) { out.println("对不起,暂时没有信息"); } else{ rs.last(); int i = 0; CountRow = rs.getRow(); CountPage = (CountRow/PageSize); if (CountRow%PageSize>0) CountPage++; Integer n = (CurrPage-1)*5+1; rs.first(); rs.absolute(CurrPage*PageSize-PageSize+1); while (i <% rs.next(); i++; } } } catch (SQLException e) { out.println(e.getMessage()); } finally { con.close(); } } %>
车位编号 车位类型 当前状态 车位位置 删除
<%=rs.getString("chewei_no")%> <%=rs.getString("chewei_type")%> <%=rs.getString("chewei_state")%> <%=rs.getString("chewei_didian")%> ">删除
[<%=CurrPage%>/<%=CountPage %>] 每页<%=PageSize %>条 共<%=CountRow%>条记录
<% for (int i = 1;i<=CountPage;i++){%> [<%=i%>] <%}%>