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

📄 price.asp

📁 1. 硬件环境:MS WINDOWS NT PACK 4 OR LATER /WIN2000 WITH IIS 4.0 OR LATER /WIN9X+PWS 2. 数 据 库:Access2000
💻 ASP
字号:
<!-- #include file="setup.asp" -->
<%
validate "Login.asp",4
'----------------------------------------------读取价格名称--------------------------------------------
sql="Select FunctionInfo From Functions where FunctionID Between 13 and 15"
Set Rs = Conn.Execute(sql)
ProductI=Rs("FunctionInfo")
rs.movenext
ProductII=Rs("FunctionInfo")
rs.movenext
ProductIII=Rs("FunctionInfo")
rs.close
Set Rs = Nothing
if Request.ServerVariables("request_method")="POST" then

D1=Request.Form("D1")
D2=Request.Form("D2")
T1=Request.Form("T1")


ProductSort=Request.Form("ProductSort")
if ProductSort="" then error 2,"请选择您的产品类别!",""
if D2="" then error 2,"请选择价格类型!",""
if D1="" then error 2,"请选择操做!",""
if T1="" then error 2,"请输入调整金额或比例!",""


Set rs = Server.CreateObject("ADODB.Recordset")
Select case Request.Form("QQ")
case "Comparison"
	for each nums in request.form("ProductSort")
		if instr(ProductSort,"all")>0 then
		sql="Select ProductI,ProductII,ProductIII from Product_Info where DelThis=False"
		else
		sql="Select ProductI,ProductII,ProductIII from Product_Info where DelThis=False and ProductSort="&nums
		end if
		rs.open sql,conn,1,3
			if D2="AllPrice" then 
				do while not rs.eof
				if D1="+" then
				rs("ProductI")=rs("ProductI")+(rs("ProductI")*(T1/100))
				rs("ProductII")=rs("ProductII")+(rs("ProductII")*(T1/100))
				rs("ProductIII")=rs("ProductIII")+(rs("ProductIII")*(T1/100))
				elseif D1="-" then
				rs("ProductI")=rs("ProductI")-(rs("ProductI")*(T1/100))
				rs("ProductII")=rs("ProductII")-(rs("ProductII")*(T1/100))
				rs("ProductIII")=rs("ProductIII")-(rs("ProductIII")*(T1/100))
				end if
				rs.movenext
				loop
			else
				do while not rs.eof
				if D1="+" then
				rs(D2)=rs(D2)+(rs(D2)*(T1/100))
				elseif D1="-" then
				rs(D2)=rs(D2)-(rs(D2)*(T1/100))
				end if
				rs.movenext
				loop
			end if
		rs.close
	next
case "AandS"
	for each nums in request.form("ProductSort")
		if instr(ProductSort,"all")>0 then
		sql="Select ProductI,ProductII,ProductIII from Product_Info where DelThis=False"
		else
		sql="Select ProductI,ProductII,ProductIII from Product_Info where DelThis=False and ProductSort="&nums
		end if
		rs.open sql,conn,1,3
			if D2="AllPrice" then 
				do while not rs.eof
				if D1="+" then
				rs("ProductI")=rs("ProductI")+T1
				rs("ProductII")=rs("ProductII")+T1
				rs("ProductIII")=rs("ProductIII")+T1
				elseif D1="-" then
				rs("ProductI")=rs("ProductI")-T1
				rs("ProductII")=rs("ProductII")-T1
				rs("ProductIII")=rs("ProductIII")-T1
				end if
				rs.movenext
				loop
			else
				do while not rs.eof
				if D1="+" then
				rs(D2)=rs(D2)+T1
				elseif D1="-" then
				rs(D2)=rs(D2)-T1
				end if
				rs.movenext
				loop
			end if
		rs.close
	next
End Select
Set Rs = Nothing
response.redirect "Price.asp"
end if
Call top
Call table()
%>
<br>

<table width="100%" cellspacing=0 cellpadding=4 border=0 height="45" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td height="16" align="center" background=images/title_sub.gif width="975">
<b>产品价格调整</b></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="1" align="left" width="957">&nbsp;<img src="images/2.gif" width="60" height="9"> 操做小技巧:按住"Ctrl"键可以同时选中几个产品的类别进行操作哦!
 </td>
</tr>
</table>


<form method="POST" >
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="100%">
    <p align="center">将 
    <select size="10" name="ProductSort" multiple>
<option value=all>所有产品</option>
<%listsort%>
</select> &nbsp;的&nbsp;<select size="1" name="D2">
    <option value="">价格类型</option>
    <option value=AllPrice>所有价格</option>
    <option value=ProductI><%=ProductI%></option>
    <option value=ProductII><%=ProductII%></option>
    <option value=ProductIII><%=ProductIII%></option>
    </select> &nbsp;
    <select size="1" name="D1">
    <option value="">操作</option>
    <option value=+>上调</option>
    <option value=->下降</option>
    </select> <input type="text" name="T1" size="3"> %
    <input type="submit" value="确定" name="sumbit"><input name=QQ type="hidden" value=Comparison></td>
  </tr>
</table>
</form>


<form method="POST" >
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
  <tr>
    <td width="100%">
    <p align="center">将&nbsp;<select size="10" name="ProductSort" multiple>
<option value=all>所有产品</option>
<%listsort%>
</select> 的
    <select size="1" name="D2">
    <option value="">价格类型</option>
    <option value=AllPrice>所有价格</option>
    <option value=ProductI><%=ProductI%></option>
    <option value=ProductII><%=ProductII%></option>
    <option value=ProductIII><%=ProductIII%></option>
    </select> &nbsp;
    
    <select size="1" name="D1">
    <option value="">操作</option>
    <option value=+>+</option>
    <option value=->-</option>
    </select>&nbsp; <input type="text" name="T1" size="3"> 元
    <input type="submit" value="确定" name="sumbit"><input name=QQ type="hidden" value=AandS>
    <br>(精确到小数点后两位数,也就是"分"单位)
    </td>
  </tr>
</table>
</form>



<center>注:以上价格调整的转换比例以中华人民共和国<font color=#ff0000>"人民币"</font>为转换标准。
<br>
<%htmlend%>

⌨️ 快捷键说明

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