📄 bldyindex.asp
字号:
<%
'功能:公文办理定义
'作者:展亮
'时间:2003-12-11 21:50
%>
<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/Conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%Response.Expires=-1
'------------------------------------------------设置参数
maxmessage=15 '每页显示记录数
currentpage=request("page") '当前页码
'------------------------------------------------
'------------------------------------------------删除记录
if Request.Form("del_check")<>"" then
set rs_check=createobject("adodb.recordset")
oConn.BeginTrans
for each i in Request.Form("del_check")
sql="select blgzbh from tbioaOffice_FlowPoint where blgzbh="&clng(i)
rs_check.open sql,oConn,1,1
if not rs_check.eof and not rs_check.bof then
err_del1=1
end if
rs_check.close
sql="select blgzbh from tbioaOffice_FlowPoint_Template where blgzbh="&clng(i)
rs_check.open sql,oConn,1,1
if not rs_check.eof and not rs_check.bof then
err_del2=1
end if
rs_check.close
if (err_del1=0) and (err_del2=0) then
sql="delete from tbioaOffice_Flow_Bldy where blgzbh="&clng(i)
oConn.execute(sql)
'同时从其他工作点的前提工作点中删除该节点
sql="update tbioaOffice_Flow_Bldy set qtgzbh=replace(qtgzbh,'"& cstr(i)&",','')"
oConn.execute(sql)
sql="update tbioaOffice_Flow_Bldy set qtgzbh=replace(qtgzbh,',"&cstr(i)&"','')"
oConn.execute(sql)
end if
next
if (err_del1=0) and (err_del2=0) then
oConn.CommitTrans%>
<script>
history.back()
</script>
<%else%>
<script>
alert("您所要删除的办理工作点中,有已经被使用的,不能删除")
history.back()
</script>
<% oConn.RollBackTrans
end if
set rs_check=nothing
end if
'------------------------------------------------
'------------------------------------------------取记录
'分页取公文办理定义记录 (返回rs对象)
'rs.recordcount 为记录总数
'rs.PageSize 为本页记录数
'
set rs=createobject("adodb.recordset")
sql="select * from tbioaOffice_Flow_Bldy"
rs.open sql,oConn,1,1
Showpage=Paging(rs,maxmessage,currentpage,"")
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css">
<title>公文办理定义</title>
<script language="vbscript">
function delthis()
dim i,j
j=0
for i=0 to ((formtj.elements.length)-1)
if (formtj.elements(i).checked) then
j=1
end if
next
if j=0 then
alert("请选择所要删除的办理工作")
exit function
elseif j=1 then
if msgbox("您确定要删除选择的办理工作吗?",vbYesNo+vbQuestion,"询问") = vbYes then
formtj.submit
else
exit function
end if
end if
end function
</script>
</head>
<body topmargin="10" leftmargin="10">
<table width=98% border=0 align=center>
<tr valign=center><td align=left><img src="../images/icon_title.gif" align="absmiddle"> 公文办理工作列表</td>
<td align=right valign=bottom>
<input type=button class="button0" onmouseout=className="button0" onmouseover=className="button1" value="新增办理工作" id=bZJ name=bZJ onclick="vbscript:window.location='BldyEdit.asp'">
<input type=button class="button0" onmouseout=className="button0" onmouseover=className="button1" value="删除办理工作" id=bQuery name=del_button onclick="delthis()">
</td></tr>
</table>
<hr width="100%" size=1 color="#000000">
<br>
<%
if rs.RecordCount=0 then
response.write "<BR><BR>暂时为空!"
else
%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class=tdTop width="60" align=center><nobr>编号</nobr></td>
<td class=tdTop width=120><nobr>工作名称</nobr></td>
<td class=tdTop><nobr>前提工作名称</nobr></td>
<td class=tdTop width=100><nobr>定制流程</nobr></td>
<td class=tdTop width=50><nobr>操作</nobr></td>
</tr>
<form id="formTJ" method="post" action="?page=<%=currentpage%>">
<%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 align=left class=<%=td_class%>>
<td nowrap align=left>
<input type="checkbox" value="<%=rs("blgzbh")%>" name="del_check"> <%=server.HTMLEncode(rs("blgzbh"))%>
</td>
<td nowrap align=center><%=server.HTMLEncode(rs("blgzmc"))%></td>
<td nowrap align=left><%=listqtgzd(rs("qtgzbh"))%></td>
<td nowrap align=center>
<%if rs("dzlcqx")="0" then
Response.Write "不可定制"
elseif rs("dzlcqx")="1" then
Response.Write "允许定制"
end if
%>
</td>
<td nowrap width="50">
<img src="../images/icon_edit.gif" border=0 align="left" alt="修改"><a href="BldyEdit.asp?bh=<%=rs("blgzbh")%>">编辑</a>
</td>
</tr>
<%
rs.MoveNext
next
%>
</form>
<tr align=left class=tdbottom><td class=listtail colspan=5 align=right><%=Showpage%></td></tr>
</table>
<%
end if
rs.close
%>
</body>
</html>
<%'释放对象变量
oConn.close
%>
<%
function listqtgzd(qtgzd)
dim qtgzdmc
sql="select blgzmc from tbioaOffice_Flow_Bldy where ',"&qtgzd&",' like '%,'+ cast(blgzbh as varchar) + ',%'"
set rs1=createobject("adodb.recordset")
rs1.open sql,oConn,1,1
if not rs1.eof and not rs1.bof then
do while not rs1.eof
qtgzdmc=qtgzdmc + server.HTMLEncode(rs1("blgzmc"))+","
rs1.movenext
loop
Response.Write left(qtgzdmc,len(qtgzdmc)-1)
end if
rs1.close
set rs1=nothing
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -