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

📄 save.asp

📁 客户管理系统的代码示例。“数据库”目录下为客户管理系统的数据库 备份文件;“源代码”目录下为系统各功能页面脚本代码。
💻 ASP
字号:
<!--#include file='DBCn.asp'-->
<%
	T_ClientID = request.form("T_ClientNameID")
	T_ClientName  = replace(request.form("T_ClientName"),"'","''")
	T_ClientEmail =replace(request.form("T_ClientEmail"),"'","''")
	T_ClientNation=replace(request.form("T_ClientNation"),"'","''")
	T_ClientPro   =replace(request.form("T_ClientPro"),"'","''")
	T_ClientHpage =replace(request.form("T_ClientHpage"),"'","''")
	T_ClientPcode =replace(request.form("T_ClientPcode"),"'","''")
	T_ClientIncome=Clng(request.form("T_ClientIncome"))
	T_ClientEmpNum=Clng(request.form("T_ClientEmpNum"))
	T_ClientTel   =replace(request.form("T_ClientTel"),"'","''")
	T_ClientFax   =replace(request.form("T_ClientFax"),"'","''")
	T_ClientAdd   =replace(request.form("T_ClientAdd"),"'","''")
	T_ClientABank  =replace(request.form("T_ClientABank"),"'","''")
	T_ClientANum   =replace(request.form("T_ClientANum"),"'","''")
  %>
<%
if T_ClientID <> 0 then
sql= "update Customer set Name='"&T_ClientName&"',Nation='"&T_ClientNation&"',Province='"&T_ClientPro&"',PostCode='"&T_ClientPcode&"',Address='"&T_ClientAdd&"',Phone='"&T_ClientTel&"',Fax='"&T_ClientFax&"',Email='"&T_ClientEmail&"',Homepage='"&T_ClientHpage&"',YearIncome="&T_ClientIncome&",EmpNum="&T_ClientEmpNum&",AccountBank='"&T_ClientABank&"',AccountNum='"&T_ClientANum&"' where ID= '"&T_ClientID&"'"
'更新数据库数据
else
sql="insert into Customer (Name,Nation,Province,PostCode,Address,Phone,Fax,Email,Homepage,YearIncome,EmpNum,AccountBank,AccountNum) values ('"&T_ClientName&"','"&T_ClientNation&"','"&T_ClientPro&"','"&T_ClientPcode&"','"&T_ClientAdd&"','"&T_ClientTel&"','"&T_ClientFax&"','"&T_ClientEmail&"','"&T_ClientHpage&"',"&T_ClientIncome&","&T_ClientEmpNum&",'"&T_ClientABank&"','"&T_ClientANum&"' )"
end if
'添加数据到数据库
conn.execute( sql )    '执行数据库更新
if T_ClientID = 0 then
	set rs=conn.execute("select top 1 ID from Customer order by ID desc")
	T_ClientID = rs("ID")
rs.close
end if
%>
<html>
<head>
<title>保存客户信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<LINK 
href="css.css" type=text/css rel=stylesheet>
</head>

<body>

<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
  <tr>
    <td width="100%" height="197" align="center">
<table border="0" cellspacing="0" cellpadding="0" height="85" bgcolor="#99ccff" width="100%">
<tr>
<td align="center">
<a href="customer.asp?clientid=<%=T_ClientID%>" class=linkblue2>保存客户信息成功!!单击返回</a>
<%
	response.write "<script>"
	response.write "setTimeout("&Chr(34)&"location.replace('Customer.asp?clientid="&T_ClientID&"')"&Chr(34)&",1000)"
	response.write "</script>"
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>

</body>
</html>

⌨️ 快捷键说明

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