📄 delete.asp
字号:
<% option explicit%>
<!-- #include virtual="include/DataEnvi.asp" -->
<!-- #include virtual="include/Page.asp" -->
<%
Dim ObjDB,StrSQL,ObjRS,ObjDepID
Dim C,IntIDs
IntIDs=Request.QueryString("IDs")
Set ObjDB = Server.CreateObject("ADODB.Connection")
OpenDB ObjDB
Set C = Server.CreateObject ("CMS2003.DBhandle")
C.Init(ObjDB)
Set ObjRS = C.View("Select ID From t_OA_SYS_Department Where ParentID In (" & IntIDs & ") And ParentID<>0")
If ObjRS("ID")="" Then
Set ObjDepID = C.View("Select ID From t_OA_SYS_Department_Account Where DepID In (" & IntIDs & ") And DepID<>0")
If ObjDepID("ID") = "" Then
Call C.Delete(IntIDs,"t_OA_SYS_Department")
ObjDB.Close
Set ObjDB = Nothing
Response.Redirect "List.asp?ParentID=" & Request.QueryString("ParentID")
Else
ObjDB.Close
Set ObjDB = Nothing
Response.Redirect "../../../Error.asp?Err=存在部门人员,不能删除"
End If
Else
ObjDB.Close
Set ObjDB = Nothing
Response.Redirect "../../../Error.asp?Err=存在下级部门,不能删除"
End If
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -