//orgManage.JSP 管理页面,在前一个页面修改一下,加上可以插入和删除的功能
<%@ page contentType="text/html;charset=Big5"%>
<%@ include file="orgConnInclude.jsp"%>
<%
request.setCharacterEncoding("big5");
PreparedStatement ps=null;
ResultSet rs=null;
String queryCount=" select count(*) "
" from ngb_org "
" where total like ? ORDER BY TOTAL ";
String queryName=" select * "
" from ngb_org "
" where total like ? ORDER BY TOTAL ";
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Big5">
<title>管理組織架構</title>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
.style2 {color: #0066FF}
-->
</style>
</head>
<body>
<form action="orgInsert.jsp">
<fieldset>
<legend align="Right">
<span class="style2">新增組織架構</span>
</legend>
<p align="left" class="style2">所 屬 部 門
<select name="fDep">
<optgroup label="總經理室">
<option value="總經理室">總經理室
<optgroup label="製造處">
<option value="製造處">製造處
<option value="製造一部">製造一部
<option value="製造二部">製造二部
<option value="製造三部">製造三部
</optgroup>
<optgroup label="管理處">
<option value="管理處">管理處
<option value="管理部">管理部
</optgroup>
<optgroup label="行銷處">
<option value="行銷處">行銷處
<optgroup label="財務部">
<option value="財務部">財務部
<optgroup label="研發處">
<option value="研究發">研發處
<optgroup label="品保部">
<option value="品保部">品保部
<optgroup label="稽核室">
<option value="稽核室">稽核室
</optgroup>
</select>
</p>
<p align="left" class="style2">新增部門名稱
<input type="text" name="dep"/>
<input type="submit" id="Submit" value="確認">
</p>
</fieldset>
</form>
<font color="#0099FF" size=4></font>
<center>
<font color="#0099FF" size=4><center>*****有限公司組織架構圖</center></font>
<table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<!--th width="7%" rowspan="2" bgcolor="#0099FF" scope="col"> </th-->
<th width="29%" bgcolor="#0099FF" scope="col"><span class="style1">總經理</span></th>
<th width="19%" bgcolor="#0099FF" scope="col"><span class="style1">總經理直屬</span></th>
<th width="19%" bgcolor="#0099FF" scope="col"><span class="style1">處級所屬</span></th>
<th width="19%" bgcolor="#0099FF" scope="col"><span class="style1">部級所屬</span></th>
<th width="19%" bgcolor="#0099FF" scope="col"><span class="style1">刪除部門</span></th>
</tr>
<%
try{
int i=1;
ps=conn.prepareStatement(queryCount);
ps.setString(1, "A10%");
rs=ps.executeQuery();
int result=1;
while(rs.next())
{ result ;}
//out.println(result);
for( i=1; i<=result; i ){
ps=conn.prepareStatement(queryName) ;
String queryNameCondition="A" (9 i) "%";
//out.println(queryNameCondition);
ps.setString(1, queryNameCondition);
ResultSet rs1=ps.executeQuery();
String qa=null;
String qaTemp=null;
String qaTemp1=null;
while( rs1.next()){
qa=rs1.getString("total");
qaTemp=qa.substring(3,5);
qaTemp1=qa.substring(3,6);
%>
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




