📄 shoufeiadd.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.sql.*" errorPage=""%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-color: #93A070;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE2 {
color: #FFFFFF;
font-size: 24px;
font-weight: bold;
}
.STYLE6 {font-size: 16px; font-weight: bold; }
.STYLE7 {font-size: 16px}
.STYLE8 {color: #000000}
-->
</style>
</head>
<body>
<jsp:useBean id="Rs" scope="page" class="MyWeb.db.DBManager" />
<%
String sql = null;
String type = null;
String xmbh = null;
String xmzl = null;
String xmlx = null;
String xmmc = null;
String xmjg = null;
String message = null;
ResultSet rs = null;
%>
<%
request.setCharacterEncoding("GB2312");
type = request.getParameter("type");
if (type != null) {
xmbh = request.getParameter("xmbh");
xmzl = request.getParameter("xmzl");
xmlx = request.getParameter("xmlx");
xmmc = request.getParameter("xmmc");
xmjg = request.getParameter("xmjg");
String sql1 = "insert into shoufeixm (";
String sql2 = "values(";
if (xmbh != null) {
sql1 += "xmbh,";
sql2 += "'" + xmbh + "',";
}
if (xmzl != null) {
sql1 += "xmzl,";
sql2 += "'" + xmzl + "',";
}
if (xmlx != null) {
sql1 += "xmlx,";
sql2 += "'" + xmlx + "',";
}
if (xmmc != null) {
sql1 += "xmmc,";
sql2 += "'" + xmmc + "',";
}
if (xmjg != null) {
sql1 += "xmjg,";
sql2 += "'" + xmjg + "',";
}
sql1 = sql1.substring(0, sql1.length() - 1);
sql2 = sql2.substring(0, sql2.length() - 1);
sql1 += ")";
sql2 += ")";
sql = sql1 + sql2;
//out.print(sql);
try {
int i = Rs.executeUpdate(sql);
message = "完成新的收费项目的添加!";
} catch (Exception e) {
e.printStackTrace();
message = "出现异常清况,请重新添加";
}
}
if (message == null)
message = "";
%>
<table width="500" border="0" align="center" bgcolor="#EEEEEE">
<tr>
<td height="30" colspan="2" align="center" valign="top"
bgcolor="#BEC798" class="STYLE2 STYLE8">
新建收费项目
</td>
</tr>
<tr>
<td width="150" height="200" valign="top">
<table width="150" border="0" align="center">
<tr>
<td height="50" align="center">
<span class="STYLE6"><a href="SFXM/shoufeiadd.jsp">新建收费项目</a>
</span>
</td>
</tr>
<tr>
<td height="50" align="center">
<span class="STYLE6"><a href="SFXM/shoufeiquery.jsp">查询收费项目</a>
</span>
</td>
</tr>
<tr>
<td height="50" align="center">
<span class="STYLE6"><a href="SFXM/shoufeidel.jsp">删除收费项目</a>
</span>
</td>
</tr>
<tr>
<td height="50" align="center">
<span class="STYLE6"><a href="../main.jsp">返回</a> </span>
</td>
</tr>
</table>
</td>
<td width="" align="center" valign="top">
<form id="form" name="form" method="post"
action="shoufeiadd.jsp?type=add">
<table width="100%" border="0">
<tr>
<td width="36%" height="35" align="center">
<span class="STYLE7">项目编号</span>
</td>
<td width="64%" align="center">
<label>
<input name="xmbh" type="text" value="" size="15" />
</label>
</td>
</tr>
<tr>
<td height="35" align="center">
<span class="STYLE7">项目种类</span>
</td>
<td align="center">
<input name="xmzl" type="text" value="" size="15" />
</td>
</tr>
<tr>
<td height="35" align="center">
<span class="STYLE7">项目类型</span>
</td>
<td align="center">
<input name="xmlx" type="text" value="" size="15" />
</td>
</tr>
<tr>
<td height="35" align="center">
<span class="STYLE7">项目名称</span>
</td>
<td align="center">
<input name="xmmc" type="text" value="" size="15" />
</td>
</tr>
<tr>
<td height="35" align="center">
<span class="STYLE7">项目价格</span>
</td>
<td align="center">
<input name="xmjg" type="text" value="" size="15" />
</td>
</tr>
<td height="35" colspan="2" align="center">
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</table>
<center>
<%=message%>
</center>
</form>
</td>
</tr>
</table>
<table width="500" height="45" border="0" align="center">
</table>
<hr />
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -