欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

JSP实现树型组织架构(7)--修改orgManage.jsp

程序员文章站 2022-06-22 13:53:03
 <%@ page contenttype="text/html;charset=big5"%><%@ include file="orgconninclude.(sun...
 

<%@ page contenttype="text/html;charset=big5"%>
<%@ include file="orgconninclude.(sun企业级应用的首选)"%>

<%
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(sun企业级应用的首选)">
      <fieldset>
        <legend align="right">
          <span class="style2">新增组织架构</span>
        </legend>
        <p align="left" class="style2">所 &nbsp;属 &nbsp;&nbsp;部 &nbsp;门
  
   
   
    <select name="fdep">
  <optgroup label="总经理室">
  <option value="总经理室">总经理室
    <%
     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 ors1=ps.executequery();
     string qa=null;
     string qatemp=null;
     string qatemp1=null;
     string obdep=null;
     string ocdep=null;
    
     while( ors1.next()){
      qa=ors1.getstring("total");