?? supertype_add_deal.jsp
字號(hào):
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%@ page import="com.wgh.dao.SuperTypeDaoImpl"%>
<jsp:useBean id="SuperType" scope="page" class="commerce.SuperType">
<jsp:setProperty name="SuperType" property="*"/>
</jsp:useBean>
<jsp:useBean id="chStr" scope="page" class="com.wgh.DB.chStr"/>
<jsp:useBean id="conn" scope="page" class="com.wgh.DB.connDB"/>
<jsp:include page="safe.jsp"/>
<%
String typename=chStr.chStr(SuperType.gettypename());
ResultSet rs=conn.executeQuery("select * from tb_superType where typename='"+typename+"'");
if (rs.next()){
out.println("<script language='javascript'>alert('該大分類信息已經(jīng)添加,請(qǐng)?zhí)砑有碌拇蠓诸愋畔ⅲ?#039;);window.location.href='super_add.jsp';</script>");
}else{
int ret=0;
SuperTypeDaoImpl ins_SuperType=new SuperTypeDaoImpl();
ret=ins_SuperType.insert(SuperType);
if (ret!=0){
out.println("<script language='javascript'>alert('大分類信息添加成功!');window.location.href='superType.jsp';</script>");
}else{
out.println("<script language='javascript'>alert('大分類信息添加失敗!');window.location.href='super_add.jsp';</script>");
}
}
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -