📄 checkout_ok.asp
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn/conn.asp" -->
<!--#include file="adovbs.inc"-->
<%
'此处应用了视图v_deliver,该视图用于从tb_bookinfo和tb_fixprice数据表中获取图书的销售价
'没有定价的图书的销售价按定价计算
IF NOT ISempty(SESSION("CHECKBOOK")) THEN
sql = "Select * From v_deliver Where barcode In (" & session("checkBook") & ")"
Set rs_C = conn.Execute( sql )
ASL=""
ASL=split(session("sl"),",")
i=0
sum=0
shuliang=0
while not rs_C.eof
bookID=rs_C("barcode")
bookName=rs_C("BookName")
price=rs_C("Sellprice")
paSL=cInt(ASL(i))
sum_1=sum_1+cdbl(rs_C("Sellprice"))*ASL(i)
booksum=cdbl(rs_C("Sellprice"))*ASL(i)
sum=sum+booksum
oDate=now()
parID=Session("ID1")
set objCmd=Server.CreateObject("Adodb.Command")
objCmd.ActiveConnection=conn
objCmd.CommandType=adCmdStoredProc '其为Stored Procedure
objCmd.CommandText="Add_DeliverID" '指定存储过程名称
objCmd.Parameters.Append _
objCmd.CreateParameter("parID",adVarchar,adParamInput,30)
objCmd.Parameters.Append _
objCmd.CreateParameter("sum",adInteger,adParamInput,20)
objCmd.Parameters.Append _
objCmd.CreateParameter("oDate",adVarchar,adParamInput,20)
objCmd.Parameters.Append _
objCmd.CreateParameter("aa",adVarchar,adParamOutput,30)
objCmd.Parameters("parID")=parID
objCmd.Parameters("sum")=sum
objCmd.Parameters("oDate")=oDate
i=i+1
rs_C.movenext
wend
objCmd.Execute
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>订单保存成功!</title>
<LINK rel="stylesheet" href="CSS/STYLE.CSS" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<table width="640" height="30" border="0" align="center" cellpadding="-1" cellspacing="-1">
<tr>
<td height="30" bgcolor="#ffcf00"> </td>
</tr>
</table>
<table width="640" height="252" border="0" align="center" cellpadding="-1" cellspacing="-1">
<tr>
<td height="252" valign="top" background="images/buycar_bottom.jpg"> <div align="center">
<table width="97%" height="217" border="0" cellpadding="-1" cellspacing="-1">
<tr>
<td height="135"> <div align="center"> <strong><font color="#C60001" size="3">
<% '返回订单号等信息
orderid=objCmd.Parameters(3)
sql1 = "Select * From v_deliver Where barcode In (" & session("checkBook") & ")"
Set rs = conn.Execute( sql1 )
ASL1=""
ASL1=split(session("sl"),",")
i=0
sum=0
shuliang=0
while not rs.eof
bookID=rs("barcode")
price=rs("Sellprice")
paSL=cInt(ASL(i))
booksum=cdbl(rs("Sellprice"))*ASL(i)
sql2="insert into tb_regdeliverdetail (deliverID,barcode,num,money) values ('"&_
orderid&"','"&bookID&"',"&paSL&","&booksum&")"
set rs1=conn.execute(sql2)
i=i+1
rs.movenext
wend
for each parm in objCmd.Parameters
if parm.name="parID" then
name1="会员ID"
end if
if parm.name="sum" then
name1="订货金额"
end if
if parm.name="oDate" then
name1="订购日期"
end if
if parm.name="aa" then
name1="订单号"
end if
Response.Write name1 &":"& trim(parm)
if name1="订货金额" then
response.write "元<br>"
else
response.write "<br>"
end if
next
%>
</strong> </div></td>
</tr>
<tr>
<td><div align="center"><strong><font color="#C60001" size="3"> 订单已经成功保存,欢迎下次惠顾!</font></strong></div></td>
</tr>
</table>
<div align="center">
<input type="button" value="返 回" onclick="javascript:window.close();" style="border:1px solid;border-color:black">
</div></td>
</tr>
</table>
</body>
</html>
<%session.Abandon()
ELSE
response.Redirect("clear.asp")
end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -