📄 task_d.asp
字号:
<%
'************************************************************************************************
' 文件名: task_d.asp
' Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'
' 创建人 : 周秋舫
' 日 期 : 2002-05-30
' 修改历史 :
' ****年**月**日 ****** 修改内容:******************************************************************
' 功能描述 : 删除任务信息
' 版 本 :
'************************************************************************************************
option explicit
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>
<!-- #include file="../include/config.inc" -->
<!-- #include file="../include/common.inc" -->
<!-- #include file="../include/debug.inc" -->
<!-- #include file="../include/db.inc" -->
<!-- #include file="../include/date.inc" -->
<!-- #include file="../include/datahandle.inc" -->
<!-- #include file="../include/recordlist.inc" -->
<!-- #include file="../include/security.inc" -->
<!-- #include file="../include/emp.inc" -->
<!-- #include file="task_e.inc" -->
<%
dim iEmpSerial : iEmpSerial = GetEmpSerial
if CStr(iEmpSerial) = "" then
Response.Clear
Response.Write "<script language=""javascript"">window.close();</script>"
Response.end
end if
dim pTaskSerial : pTaskSerial = GetParam("serial")
if IsEmpty(pTaskSerial) then
Response.Clear
Response.Write "<script language=""javascript"">window.close();</script>"
Response.end
end if
'********************************************************************************************************
' 服务器端代码
dim oCn : set oCn = New CDBConnection
oCn.connect(dbLocal)
dim cn : set cn = oCn.m_DBConn
dim sSQL, iRows
iRows = cn.execute("select count(*) from t_task where creator = " & iEmpSerial & " and task_serial = " & pTaskSerial).fields(0).value
''response.write "select count(*) from t_task where creator = " & iEmpSerial & " and task_serial = " & pTaskSerial & "<br><br>"
''response.write iRows & "<br><br>"
if iRows > 0 then
'' 删除t_taskhistory中的相关记录
sSQL = "delete from t_taskhistory where ptask_serial in (select serial from t_personaltask where task_serial = " & pTaskSerial & ")"
''response.write sSQL & "<br><br>"
cn.execute(sSQL)
'' 删除t_personaltask中的相关记录
sSQL = "delete from t_personaltask where task_serial = " & pTaskSerial
''response.write sSQL & "<br><br>"
cn.execute(sSQL)
'' 删除t_task中的记录
sSQL = "delete from t_task where task_serial = " & pTaskSerial
''response.write sSQL & "<br><br>"
cn.execute(sSQL)
end if
oCn.Disconnect()
Response.Write "<script language=""javascript"">" & vbLF & _
"if (typeof(window.opener) != 'undefined')" & vbLF & _
"{" & vbLF & _
" window.opener.location.href='tasks.asp';" & vbLF & _
"}" & vbLF & _
"window.close();" & vbLF & _
"</script>" & vbLF
Response.end
%>
<html>
<body>
<script language="javascript">
if (typeof(window.opener) != 'undefined')
{
window.opener.location.href='tasks.asp';
}
window.close();
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -