📄 ft_point_del.asp
字号:
<%
'功能:公文工作流程模板设置-删除工作点
'作者:展亮
'时间:2003-12-12 14:43
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'------------------------------------------------设置参数
slcbh=Request.Form("lcbh")
sgzdxh=Request.Form("gzdxh")
'------------------------------------------------
if slcbh="" or sgzdxh="" then
call MsgOut("没有指定工作点","javascript:history.back()",1)
Response.End
end if
'--------------------------------------------------------------
'如果该点的后继节点可以接在该点的前驱节点上则删除
dim ssPrev,ssNext,ssPrevType,ssNextType
dim rs1
set rs1=server.CreateObject("ADODB.recordset")
ssPrev=0
ssPrevType=""
ssNext=0
ssNextType=""
rs1.Open "select sgzbh,sgzdxh from tbioaOffice_Flow_Template " _
& "Where lcbh=" & slcbh & " " _
& "And zgzdxh=" & sgzdxh & " " _
,oConn,1,1
if not rs1.EOF then
ssPrev=rs1("sgzdxh")
ssPrevType=rs1("sgzbh")
end if
rs1.Close
rs1.Open "select zgzbh,zgzdxh from tbioaOffice_Flow_Template " _
& "Where lcbh=" & slcbh & " " _
& "And sgzdxh=" & sgzdxh & " " _
,oConn,1,1
if not rs1.EOF then
ssNext=rs1("zgzdxh")
ssNextType=rs1("zgzbh")
end if
rs1.Close
dim bShowDel
bShowDel=false
'Response.Write ssprev & "/" & ssprevtype & "/" & ssnext & "/" & ssnexttype
if ssNext=0 then
bshowDel=true
else
'判断
if ssPrevType<>"" then
rs1.Open "Select blgzbh from tbioaOffice_Flow_Bldy " _
& "where blgzbh='" & ssNextType & "' " _
& "and ','+qtgzbh+',' like '%," & ssPrevtype & ",%'" _
,oConn,1,1
if not rs1.eof then
bShowDel=true
end if
rs1.close
else
'看ssNextType能不能在最前面
rs1.Open "Select blgzbh from tbioaOffice_Flow_Bldy " _
& "where blgzbh='" & ssNextType & "' " _
& "and (qtgzbh='' or qtgzbh is null or qtgzbh='" & ssNextType & "') " _
,oConn,1,1
if not rs1.eof then
bShowDel=true
end if
rs1.close
end if
end if
if bShowDel then '可以删除
oConn.begintrans
'如果有前驱节点和后续节点则将前驱节点的链接指到后续节点
if ssPrev<>0 and ssNext<>0 then
oConn.execute "update tbioaOffice_Flow_Template set " _
& "zgzdxh=" & ssNext & "," _
& "zgzbh='" & ssNextType & "' " _
& "where lcbh=" & slcbh & " " _
& "and sgzdxh=" & ssprev & " "
end if
'删除节点
oConn.execute "delete from tbioaOffice_Flow_Template " _
& "where lcbh=" & slcbh & " " _
& "and (sgzdxh=" & sgzdxh & " " _
& "or zgzdxh=" & sgzdxh & ") "
oConn.execute "delete from tbioaOffice_FlowPoint_Template " _
& "where lcbh=" & slcbh & " " _
& "and gzdxh=" & sgzdxh & " "
oConn.committrans
else
call MsgOut("由于工作点的前后关系受限,此工作点不能删除","javascript:history.back()",1)
set rs1=nothing
oConn.close
set oConn=nothing
Response.End
end if
set rs1=nothing
oConn.close
set oConn=nothing
Response.Redirect "FT_Point_Index.asp?lcbh=" & slcbh
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -