⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 guikou_edit.asp

📁 财务预算管理 财务支出
💻 ASP
字号:
<!--#include file="sysconfig.asp"-->
<!--#include file="Inc/Function_1.asp"-->
<%
'黄华于2008年3月
%>
<%
dim guikou_id,Action,rs,Newguikou_name,Oldguikou_name,FoundErr,ErrMsg
id=trim(Request("id"))
Action=trim(Request("Action"))
Newguikou_name=trim(Request("Newguikou_name"))
Oldguikou_name=trim(Request("Oldguikou_name"))

if id="" then
  response.Redirect("Class.asp")
end if
Set rs=Server.CreateObject("Adodb.RecordSet")
rs.Open "Select * from guikou where id=" & id,conn,1,3
if rs.Bof and rs.EOF then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>此归口不存在!</li>"
else
	if Action="Modify" then
		if Newguikou_name="" then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>归口名不能为空!</li>"
		end if
		if FoundErr<>True then
			rs("guikou_name")=Newguikou_name
    	rs.update
			rs.Close
	    set rs=Nothing
			if Newguikou_name<>Oldguikou_name then
				conn.execute "Update guikou set guikou_name='" & Newguikou_name & "'where guikou_name='" & Oldguikou_name & "'"
     	end if		
			call CloseConn()
     		Response.Redirect "Class.asp" 
		end if
	end if
	if FoundErr=True then
		call WriteErrMsg()
	else
%>
<script language="JavaScript" type="text/JavaScript">
function checkBig()
{
  if (document.form1.guikou_name.value=="")
  {
    alert("归口名称不能为空!");
    document.form1.guikou_name.focus();
    return false;
  }
}
</script>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="360" align="center" class="a2">
	<tr>
		<td class="a1" height="25" align="center"><strong>预 算 类 别 设 置</strong></td>
	</tr>
	<tr class="a4">
		
    <td align="center"> 
      <form name="form1" method="post" action="guikou_edit.asp">
			<table width="350" border="0" align="center" cellpadding="0" cellspacing="2" class="border">
				<tr class="title"> 
					<td height="25" colspan="2" align="center" bgcolor="#999999"><strong>修改业务科室名称</strong></td>
				</tr>
				<tr class="tdbg"> 
					<td width="126" bgcolor="#C0C0C0" align=right><strong>业务科室ID:</strong></td>
					<td width="204" bgcolor="#E3E3E3"> 
					<%=rs("id")%><input name="id" type="hidden" id="id" value="<%=rs("id")%>">
					<input name="Oldguikou_name" type="hidden" id="Oldguikou_name" value="<%=rs("guikou_name")%>">
                </td>
				</tr>
				<tr class="tdbg"> 
					<td width="126" bgcolor="#C0C0C0" align=right><strong>业务科室名称:</strong></td>
					<td bgcolor="#E3E3E3">
					<input name="Newguikou_name" type="text" id="Newguikou_name" value="<%=rs("guikou_name")%>" size="20" maxlength="30"></td>
				</tr>
				<tr class="tdbg"> 
					<td align="center" bgcolor="#C0C0C0">&nbsp;</td>
					<td align="center" bgcolor="#E3E3E3"><div align="left">
					<input name="Action" type="hidden" id="Action" value="Modify">
					<input name="Save" type="submit" id="Save" value=" 修 改 ">
					</div></td>
				</tr>
			</table> 
			</form>	
		</td>
	</tr>
</table>
<BR>
<%htmlend%>
<%
	end if
end if
rs.close
set rs=nothing
call CloseConn()
%>

⌨️ 快捷键说明

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