JSP實現樹型組織架構(5)--刪除部門頁面orgDelete.jsp
來源:互聯網
上載者:User
//orgDelete.jsp 刪除部門頁面,由orgManage.jsp 而來
<%@ page contentType="text/html;charset=Big5"%>
<%@ include file="orgConnInclude.jsp"%>
<%@ page import="javax.sql.*"%>
<%
request.setCharacterEncoding("big5");
String depName=request.getParameter("name");
//out.println(depName+"<br>");
String message=null;
boolean autoCommit=conn.getAutoCommit();
String query1=" select total "+
" from ngb_org "+
" where name='"+depName+"' ";
String query2=" select * "+
" from ngb_org "+
" where total like ? ";
String delete=" delete from ngb_org "+
" where total like ? ";
String delete1=" delete from ngb_org "+
" where name=? ";
String temp1=null;
String temp1a=null;
String temp1aa=null;
String temp1b=null;
try{
conn.setAutoCommit(false);
PreparedStatement ps=conn.prepareStatement(query1);
ResultSet rs1=ps.executeQuery();
while(rs1.next())
{temp1=rs1.getString("total");}
//out.println(temp1);
temp1a=temp1.substring(0,1);
temp1aa=temp1.substring(0,3);
temp1b=temp1.substring(3,6);
//out.println(temp1b);
/*