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

📄 displaydepartment.jsp

📁 教师办公管理系统
💻 JSP
字号:
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.sql.*"%>
<%@ page import="to.model.Department.*"%>
<%@ page import="java.util.*"%>
<%@ page import="to.model.Login.*"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK">
    <title>部门信息浏览</title>
    <style type="text/css">
      table{font-size:13px}
      <!--
			a:link { text-decoration: none;color: black} 
			a:active { text-decoration:blink;} 
			
			a:hover {text-decoration: underline;position: relative; top: 3px; left: 3px; color: red}  
 			a:visited { text-decoration:none;color: black}   
			-->
    </style>
  </head>
  <body>
    <form>
      <table cellspacing="1" cellpadding="1" border="0" width="800" align="center">
     <%
        loginItem li=(loginItem)session.getAttribute("user");
        if(li==null)
        {
          response.sendRedirect("OfficeLogin.jsp");
        }
        if(!(li.getRoleName().equals("系统管理员")))
        {
          response.sendRedirect("Error2.jsp");
        }
      %>
        
        <tr>
          <td colspan="5" height="1"><hr/></td>
        </tr>
        <tr>
          <th colspan="4" align="center">已有部门列表</th>
          <td colspan="1" align="center" width="113"><font color="Red"><img src="image/arr.gif"/><a href="newDepartment.jsp"/>添加新部门</font></td>
        </tr>
        <tr bgcolor="#006699">
          <th width="140" align="center"><font color="White">部门编号</font></th>
          <th width="299" align="center"><font color="White">部门名称</font></th>
          <th width="111" align="center"><font color="White">查看</font></th>
          <th width="111" align="center"><font color="White">修改</font></th>
          <th width="113" align="center"><font color="White">删除</font></th>
        </tr>
        <%
            try
            {
                  DepartmentBean db=new DepartmentBean();
                  Collection cl=(Collection)db.selectDepartment();
                  Iterator it=cl.iterator();
                  while(it.hasNext())
                  {
                    DepartmentItem di=(DepartmentItem)it.next();
                    %>
                      <tr bgcolor="#ddddee">
                        <td width="140" align="center"><%=di.getDepartmentID()%></td>
                        <td width="299" align="center"><%=di.getDepartmentName()%></td>
                        <td width="111" align="center"><font color="Blue"><img src="image/arr.gif"/><a href="FindDepartmentAction.do?id=<%=di.getDepartmentID()%>">查看</a></font></td>
                        <td width="111" align="center"><font color="Blue"><img src="image/arr.gif"/><a href="EditDepartmentAction.do?id=<%=di.getDepartmentID()%>">修改</a></font></td>
                        <td width="113" align="center"><font color="Blue"><img src="image/arr.gif"/><a href="DeleteDepartmentAction.do?id=<%=di.getDepartmentID()%>">删除</a></font></td>
                      </tr>
                    <%
                  }
            }
            catch(Exception e)
            {
              e.printStackTrace();
            }
        %>
        <tr>
          <td colspan="5" height="1"><hr/></td>
        </tr>
      </table>
    </form>

  </body>
</html>

⌨️ 快捷键说明

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