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

📄 job_list_enact.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'功能:查看所有任务
'参数:request("page")=int #当前页码; request("selectdate")="date" #显示当日任务
%>

<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->

<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
maxmessage=15 '每页显示记录数
currentpage=request("page") '当前页码
selectdate=request("selectdate") '是否显示所有任务
'------------------------------------------------
'------------------------------------------------取记录
'分页取任务记录 (返回rs对象)
'rs.recordcount 为记录总数
'rs.PageSize 为本页记录数
'

if selectdate<>"" then where="where UserID="&LoginID&" and StartDate<='"&selectdate&"' and EndDate>='"&selectdate&"'" else where="where UserID="&LoginID '查寻条件

set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from tbioaJob "&where&" order by ID desc"
'response.write sql
rs.open sql,oConn,1,1
Showpage=Paging(rs,maxmessage,currentpage,"selectdate="&selectdate)
'------------------------------------------------
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
<base target="FrmMain">
</head>

<body topmargin="10" leftmargin="10">

<!--#include file="job_menu.html"-->

<hr width="100%" size=1 color="#000000">

<%=Showpage%>
<br><br>
<%
if rs.RecordCount=0 then
	response.write "<BR><BR>暂时为空!"
else
%>

<table width="100%" cellspacing="1" cellpadding="2" class="tab">
  <tr>
    <td class="tdTop">任务标题</td>
    <td class="tdTop" width="68">开始日期</td>
    <td class="tdTop" width="68">结束日期</td>
    <td class="tdTop" width="68">重要程度</td>
    <td class="tdTop" width="68">完成情况</td>
    <td class="tdTop" colspan="3" width="100">相关操作</td>
  </tr>
<%for i = 0 to rs.PageSize-1 '循环
   If rs.EOF Then Exit For
   if i mod 2 = 0 then td_class="td1" else td_class="td2"
%>
  <tr>
    <td class="<%=td_class%>"><a href="job_show.asp?id=<%=rs("ID")%>&page=<%=currentpage%>&selectdate=<%=selectdate%>"><%=HtmlOut(rs("Title"))%></a></td>
    <td class="<%=td_class%>"><%=rs("StartDate")%></td>
    <td class="<%=td_class%>"><%=rs("EndDate")%></td>
    <td class="<%=td_class%>">
<%
	Select Case rs("Importance")
	   Case 1
	      Importance="低"
	   Case 2
	      Importance="中"
	   Case 3
	      Importance="高"
	   Case Else
	      Importance="未指定"
	End Select
%>
     <%=Importance%>
    </td>
    <td class="<%=td_class%>"><%=rs("Finish")%>%</td>
    <td class="<%=td_class%>" width="50">
      <img border="0" src="../images/icon_edit.gif" align="left">  
      <a href="job_edit.asp?id=<%=rs("ID")%>&page=<%=currentpage%>&selectdate=<%=selectdate%>">编辑</a>
    </td>
    <td class="<%=td_class%>" width="50">
      <img border="0" src="../images/icon_dele.gif" align="left">
      <a href="job_dele.asp?id=<%=rs("ID")%>&page=<%=currentpage%>&selectdate=<%=selectdate%>" onClick="return confirm('确定要删除该条任务吗?\n该操作不可恢复!')">删除</a>
   </td>
  </tr>
<%
rs.MoveNext
next
%>
</table>

<%
end if
rs.close
%>

</body>

</html>

<%'释放对象变量
oConn.close
%> 

⌨️ 快捷键说明

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