deptmng.asp

来自「档案管理系统」· ASP 代码 · 共 41 行

ASP
41
字号
<!--#include file="docdb.inc"-->

<%
	dim adoRS
	dim strQuery
	strQuery = "select * from deptinfo"
	set adoRS=server.createobject("ADODB.Recordset")
	adoRS.Open strQuery, getConnection(), , , adCmdText
%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript" src="../../include/tools.js"></script>
</head>

<body>
<table width="95%" border="1">
  <tr> 
    <td><div align="center">部门名称</div></td>
    <td><div align="center">部门描述</div></td>
    <td><div align="center">操作</div></td>
  </tr>
  <%
  while not adoRS.EOF 
  %>
  <tr> 
    <td><div align="center"><%=adoRS("deptname")%></div></td>
    <td><div align="center"><%=insertBR(adoRS("deptdesc"))%></div></td>
    <td><div align="center"> <a href="javascript:doWhenConfirm('确定要删除<%=adoRS("deptname")%>吗?','action.asp?op=deldept&deptname=<%=adoRS("deptname")%>')">删除</a> <a href="javascript:doWhenInput('请输入机构描述','action.asp?op=setDeptDesc&deptname=<%=adoRS("deptname")%>&deptdesc=')">修改描述</a></div></td>
  </tr>
  <%
  adoRS.MoveNext
  Wend
  %>
</table>
<p><a href="javascript:doWhenInput('请输入部门名称','action.asp?op=addDept&deptname=')">增加部门</a></p>
</body>
</html>

⌨️ 快捷键说明

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