📄 afgl_gc_yszl_zd.asp
字号:
<!--#include file="WNP_INCLUDE.ASP" -->
<div align="center">
<input type="button" name="Submit" value="新 增" onClick="location.href='?action=addIF';">
</div>
<script language="javascript">
<!--
function checkForm(){
if(form1.YSZL_MingCheng.value == ""){
alert("工作组名称不能为空!");
form1.YSZL_MingCheng.focus();
return false;
}
}
//-->
</script>
<!-- 工程名称列表 -->
<%
sub listAll()
sql = "select * from AFGL_GC_YSZL_ZD where YSZL_MingCheng is not null order by id asc"
rs.open sql,conn,1,1
if not rs.eof then
%>
<table width="500" border="1" align="center" cellpadding="5" cellspacing="0" class="FPtalbe">
<tr>
<td height="30" colspan="3" align="center"><span class="blackTitle">申请验收所需的全套图纸资料(列表)</span></td>
</tr>
<tr align="center">
<td>资料名称</td>
<td width="20%">修改</td>
<td width="20%">删除</td>
</tr>
<%
do while not rs.eof
%>
<tr align="center">
<td align="left"><%=rs("YSZL_MingCheng")%> </td>
<td align="center"><input type="button" name="Submit" value="修改>>" onClick="location.href='?action=edit&id=<%=rs("id")%>';"></td>
<td align="center"><input type="button" name="Submit" value="删除>>" onClick="if(confirm('此操作将删除该组及该组职务,确定删除?')){location.href='?action=delItem&id=<%=rs("id")%>';}"></td>
</tr>
<%
rs.movenext
loop
%>
</table>
<%
else
response.Write("<p align=center>暂时没有记录,请点击""新增""按钮添加!</p>")
end if
rs.close
end sub
%>
<!-- 添加界面 -->
<%
sub addIF()
%>
<table width="500" border="1" align="center" cellpadding="5" cellspacing="0" class="FPtalbe">
<form name="form1" method="post" action="?action=saveAdd" onSubmit="return checkForm();">
<tr align="center">
<td colspan="2" class="blackTitle">申请验收所需的全套图纸资料</td>
</tr>
<tr align="center">
<td width="15%"> 资料名称</td>
<td width="35%" align="left"><input name="YSZL_MingCheng" type="text" id="YSZL_MingCheng" size="40">
<span style="color: #FF0000">* <span style="color: #FF0000"> </span> </span></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="Submit" value="提 交">
<input type="reset" name="Submit" value="返 回" onClick="history.back();"></td>
</tr>
</form>
</table>
<%
end sub
%>
<!--保存添加 -->
<%
sub saveAdd()
YSZL_MingCheng = trim(request.Form("YSZL_MingCheng"))
sql = "select * from AFGL_GC_YSZL_ZD where YSZL_MingCheng = '"&YSZL_MingCheng&"'"
rs.open sql,conn,1,1
if not rs.eof then
rs.close
response.Write("<script language=javascript>alert('名称重复!');location.href='?';</script>")
else
rs.close
sql = "select * from AFGL_GC_YSZL_ZD"
rs.open sql,conn,1,3
rs.addnew
if YSZL_MingCheng <> "" then
rs("YSZL_MingCheng") = YSZL_MingCheng
end if
rs.update
rs.close
response.Redirect("?")
end if
end sub
%>
<!-- 修改界面 -->
<%
sub editIF()
sql="select * from AFGL_GC_YSZL_ZD where id="&trim(request.QueryString("id"))
rs.open sql,conn,1,1
if not rs.eof then
%>
<table width="500" border="1" align="center" cellpadding="5" cellspacing="0" class="FPtalbe">
<form name="form1" method="post" action="?action=saveMod&id=<%=rs("id")%>" onSubmit="return checkForm();">
<tr align="center">
<td colspan="2" class="blackTitle">申请验收所需的全套图纸资料</td>
</tr>
<tr align="center">
<td width="15%"> 资料名称</td>
<td width="35%" align="left"><input name="YSZL_MingCheng" type="text" id="YSZL_MingCheng" value="<%=rs("YSZL_MingCheng")%>" size="40">
<span style="color: #FF0000">*</span></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="Submit" value="修 改">
<input type="reset" name="Submit" value="返 回" onClick="history.back();"></td>
</tr>
</form>
</table>
<%
rs.close
else
rs.close
response.Write("<script language=javascript>alert('没有相关记录!');history.back();</script>")
end if
end sub
%>
<%
sub saveMod()
YSZL_MingCheng = trim(request.Form("YSZL_MingCheng"))
sql = "select * from AFGL_GC_YSZL_ZD where YSZL_MingCheng = '"&YSZL_MingCheng&"' and id<>"&trim(request.QueryString("id"))
rs.open sql,conn,1,1
if not rs.eof then
rs.close
response.Write("<script language=javascript>alert('名称重复!');location.href='?';</script>")
else
rs.close
sql = "select * from AFGL_GC_YSZL_ZD where id="&trim(request.QueryString("id"))
rs.open sql,conn,1,3
if YSZL_MingCheng <> "" then
rs("YSZL_MingCheng") = YSZL_MingCheng
end if
rs.update
rs.close
response.Redirect("?")
end if
end sub
%>
<%
sub delItem()
sql="delete from AFGL_GC_CYRY_ZD where YSZL_MingCheng="&trim(request.QueryString("id"))
conn.execute(sql)
sql="delete from AFGL_GC_YSZL_ZD where id="&trim(request.QueryString("id"))
conn.execute(sql)
response.Write("<script language=javascript>alert('删除成功!');location.href='?';</script>")
end sub
%>
<!-- 页面流程 -->
<%
action = request.QueryString("action")
Select Case action
Case "addIF"
call addIF()
Case "saveAdd"
call saveAdd()
Case "edit"
call editIF()
Case "saveMod"
call saveMod()
Case "delItem"
call delItem()
Case Else
call listAll()
End Select
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -