论文首页哲学论文经济论文法学论文教育论文文学论文历史论文理学论文工学论文医学论文管理论文艺术论文 |
§5.2更新的功能实现
5.2.1公交站点管理
<%@ page contentType="text/html; charset=ISO8859_1" %>
<%@ page import="java.util.*,java.sql.*,com.lanyuer.util.*;" %>
<jsp:useBean id="reader" scope="request" class="com.lanyuer.util.JspParamReader"/>
<%
reader.setRequest(request);
List stopsets = null;
Connection connection;
com.lanyuer.route.stopset_Manager stopset_Manager = com.lanyuer.route.stopset_Manager.getInstance();
com.lanyuer.route.stopset stopset1 = null;
connection = DataConnectionManager.getInstance().getConnection();
try {
if (reader.getString("delRoute_Pk","").length() > 0) stopset_Manager.deleteByPk(connection,com.lanyuer.route.stopset_Pk.valueOf(reader.getString("delRoute_Pk","")));
stopsets = stopset_Manager.selectes(connection);
if (reader.getString("stopset_Pk","").length() > 0) stopset1 = stopset_Manager.selectByPk(connection,com.lanyuer.route.stopset_Pk.valueOf(reader.getString("stopset_Pk","")));
} catch (Exception e) {
throw e;
} finally {
if (connection != null) {
connection.close();
connection = null;
}
}
%>
<html>
<head>
<title>公交查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO8859_1">
</head>
<link rel="STYLESHEET" type="text/css" href="../css/all.css">
<style type="text/css">
<!--
body { font-size: 9pt}
table { font-size: 9pt}
a:active { font-size: 9pt; color: #000000;}
A:hover { font-size: 9pt; COLOR: #000000; TEXT-DECORATION: none}
a:link { font-size: 9pt; color: #000000;}
a:visited { font-size: 9pt; color: #000000;}
-->
</style>
<body bgcolor="#000000" text="#000000" topmargin="0" leftmargin="0" background="../image/back.gif">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="100%" align="center">
<table width="600" height="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="100%" width="100%" align="center" valign="top">
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="24">编号</td>
<td align="center">名称</td>
<td align="center">类型1/0</td>
<td align="center">操作</td>
</tr>
<tr>
<form action="stopset_save.jsp">
<%
if (stopset1 != null) {
%>
<td height="24"><input type="hidden" name="pkValue" value="<%=stopset1.getPrimaryKey().toString()%>"><input type="text" name="iStopNo" value="<%=stopset1.getiStopNo()%>"></td>
<td align="center"><input type="text" name="cStopName" value="<%=stopset1.getcStopName()%>"></td>
<td align="center"><input type="text" name="iType" value="<%=stopset1.getiType()%>"></td>
<td align="center"><input type="submit" value="保存"></td>
<%
} else {
%>
<td height="24"><input type="hidden" name="pkValue" value=""><input type="text" name="iStopNo" value=""></td>
<td align="center"><input type="text" name="cStopName" value=""></td>
<td align="center"><input type="text" name="iType" value=""></td>
<td align="center"><input type="submit" value="保存"></td>
<%
}
%>
</form>
</tr>
<%
Iterator iterator = stopsets.iterator();
while(iterator.hasNext()) {
com.lanyuer.route.stopset stopset = (com.lanyuer.route.stopset)iterator.next();
%>
<tr>
<td height="24"><a href="?stopset_Pk=<%=java.net.URLEncoder.encode(stopset.getPrimaryKey().toString())%>"><%=stopset.getiStopNo()%></a></td>
<td align="center"><%=stopset.getcStopName()%></td>
<td align="center"><%=stopset.getiType()%></td>
<td align="center"><a href="?delRoute_Pk=<%=java.net.URLEncoder.encode(stopset.getPrimaryKey().toString())%>">删除</a></td>
</tr>
<%
}
%>
</table>
</td>
</tr>
<tr>
<td height="180" align="center">
<A style="cursor:hand" onclick=javascript:history.back() ><IMG height=34 src="../image/back1.gif"></A>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>