⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deptlist.jsp

📁 本程序利用java和jsp实现电子政务中涉及到的办公日志系统。利用javabean和jsp的使用技巧和中间软件weblogic8.1.
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.*" %>
<jsp:useBean id="offLogBean" class="com.officelog.OffLogBean" scope="page"/>
<%
boolean isadmin=offLogBean.deptList(request,response);
if(!isadmin)
     response.sendRedirect("default.html");
%>
<jsp:useBean  id="deptList"   class="java.util.Vector" scope="request" />   
<%     
String partid="";
String partname="";
String userid="";
String username="";
String truename="";
Vector userList=null;
%>
<link rel="stylesheet" href="../conn/sty.css" type="text/css">
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
</head>
<body>
<div align="center"><font color="#FF9900"><span class="b1"><font color="#000000"><b>部门管理</b></font></span></font><br>
<br>
</div>
<div align="center"><a href="deptNew.jsp">新增部门</a><br>
<br>
</div>
<table width="100%" border="0" cellspacing="3" cellpadding="0" bgcolor="#CAE4FF">
<% if(deptList!=null)
{ 
       for(int i=0;i<deptList.size();i++)
       {  
           userList=(Vector)deptList.elementAt(i);
           partid=(String)userList.elementAt(0);
           partname=(String)userList.elementAt(1);
           
       %>       
    <tr> 
    	<td height="18" width="30%"><%=partname%></td>
        <td height="18" width="70%">
            <div align="right"><a href="/OfficeLog/dept/deptEdit.jsp?partid=<%=partid%>">编辑</a> 
              | <a href="/OfficeLog/dept/deptDel.jsp?partid=<%=partid%>">删除</a> | 
                <a href="/OfficeLog/dept/userNew.jsp?partid=<%=partid%>">新增员工</a> | 
            </div>
        </td>
    </tr>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<% 
            for(int j=0;j<(userList.size()-2)/3;j++)
           {
              int k=j*3+2; 
              userid=(String)userList.elementAt(k);
              username=(String)userList.elementAt(k+1);
              truename=(String)userList.elementAt(k+2);  
             
%>
    <tr>
        <td height="18" width="7%">&nbsp;</td>
        <td height="18" bgcolor="#f7f7f7" align="center"><%=userid%></td>
        <td height="18" bgcolor="#f7f7f7" align="center"><%=username%></td>
        <td height="18" bgcolor="#f7f7f7" align="center"><%=truename%></td>
          
        <td height="18" bgcolor="#f7f7f7" align="center">
           <div align="right"><a href="/OfficeLog/dept/userEdit.jsp?id=<%=userid%>">编辑</a> 
            | <a href="/OfficeLog/dept/userDel.jsp?id=<%=userid%>">删除</a> | 
           </div>
        </td>
    </tr>
    <%}%>
</table>
<br>
<%}}%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -