flowname_control.asp

来自「OFFICE办公自动化」· ASP 代码 · 共 121 行

ASP
121
字号
<%
'文件名:flowname_control.asp
'作者:展亮
'功能:公文流程名称定义
'参数:
'开发时间:2003-11-3 9:44
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<link rel="stylesheet" type="text/css" href="../css.css">
<%
oabusyusername=Session("LoginName")
'-----------------------------------------------------
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/flowstep.css" type=text/css>
<title>main</title>
</head>
<center>
<table>
<tr>
<td><b>流程名称管理</b></td>
</tr>
</table>
</center>
<br>
<center>
<%
submit=request("submit")
flow_name=request("flow_name")
oldflow_name=request("oldflow_name")

if submit="增加" and flow_name<>"" then
	set rs=server.createobject("adodb.recordset")
	sql="select * from workflow_flow_name where flow_name='" & cString(flow_name)&"'"
	rs.open sql,oConn,1
	if rs.eof or rs.bof then
		sql = "Insert Into workflow_flow_name (flow_name) Values( "
		sql = sql &"'"& cString(flow_name) & "')"
		oConn.Execute sql
	end if
	rs.close
	set rs=nothing
end if

if submit="删除" then
	sql="update workflow_form_name set flow_name='',inapplication='no' where flow_name='" & cString(oldflow_name)&"'"
	oConn.Execute sql
	sql="delete from workflow_flow_name where flow_name='" & cString(oldflow_name)&"'"
	oConn.Execute sql
	sql="delete from workflow_check_rec where flow_name='" & cString(oldflow_name)&"'"
	oConn.Execute sql
	sql="delete from workflow_flow_construction where flow_name='" & cString(oldflow_name)&"'"
	oConn.Execute sql
	sql="delete from workflow_process_rec where flow_name='" & cString(oldflow_name)&"'"
	oConn.Execute sql
	sql="delete from workflow_tell_user where flow_name='" & cString(oldflow_name)&"'"
	oConn.Execute sql
end if

if submit="修改" and flow_name<>"" then
	set rs=server.createobject("adodb.recordset")
	sql="select * from workflow_flow_name where flow_name='" & cString(flow_name) & "' and flow_name<>'" & cString(oldflow_name)&"'"
	rs.open sql,oConn,1
	if rs.eof or rs.bof then
		sql="update workflow_flow_name set flow_name='" & cString(flow_name) & "' where flow_name='" & cString(oldflow_name)&"'"
		oConn.Execute sql
		sql="update workflow_check_rec set flow_name='" & cString(flow_name) & "' where flow_name='" & cString(oldflow_name)&"'"
		oConn.Execute sql
		sql="update workflow_flow_construction set flow_name='" & cString(flow_name) & "' where flow_name='" & cString(oldflow_name)&"'"
		oConn.Execute sql
		sql="update workflow_process_rec set flow_name='" & cString(flow_name) & "' where flow_name='" & cString(oldflow_name)&"'"
		oConn.Execute sql
		sql="update workflow_tell_user set flow_name='" & cString(flow_name) & "' where flow_name='" & cString(oldflow_name)&"'"
		oConn.Execute sql
		sql="update workflow_form_name set flow_name='" & cString(flow_name) & "' where flow_name='" & cString(oldflow_name)&"'"
		oConn.Execute sql
	end if
rs.close
set rs=nothing
end if
%>

<table>

<%
set rs=server.createobject("adodb.recordset")
sql="select * from workflow_flow_name"
rs.open sql,oConn,1
while not rs.eof and not rs.bof
%>
<tr>
<form method="post" action="flowname_control.asp">
<td>
<input type="submit" value="删除" name="submit" onclick="return window.confirm('你要删除流程,如果你已经把表单与流程关联上了,将会影响工作流程的正常运行,你确定要删除这个流程吗?');">
<input type="text" name="flow_name" size=20 value="<%=rs("flow_name")%>">
<input type="hidden" name="oldflow_name" value="<%=rs("flow_name")%>">
<input type="submit" name="submit" value="修改">
</td>
</form>
</tr>
<%
rs.movenext
wend
rs.close
set rs=nothing
%>

</table>

<form method="post" action="flowname_control.asp">
输入流程名称:<input type="text" size=20 name="flow_name"><input type="submit" name="submit" value="增加">
</form>

<%
set oConn=nothing
%>
</center>
</body></html> 

⌨️ 快捷键说明

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