📄 selectqueryproduct.asp
字号:
<!--#include file="../config.ini"-->
<%
if request("mod")="save" then
dim connq
dim rsq
set connq=server.CreateObject("adodb.connection")
set rsq=server.CreateObject("adodb.recordset")
connq.Open connstring
rsq.Open "select * from deliveryquerytemp",connq,2,3,1
rsq.AddNew
rsq("model")=request("model"&request("seq"))
rsq("queryqty")=request("queryqty"&request("seq"))
rsq("createdate")=now()
rsq("createname")=session("username")
rsq("owner")=session("loginid")
rsq.Update
set rsq=nothing
connq.Close
set connq=nothing
%>
<Script Language=JavaScript>
window.opener.location.reload();
window.close();
</Script>
<%end if%>
<html>
<head>
<title>产品选择</title>
<Script Language=JavaScript>
function pickup2(x){
var queryqty='queryqty'+x;
if (isNaN(theForm.item(queryqty).value)||theForm.item(queryqty).value < 0 || theForm.item(queryqty).value==''){
alert('输入的查询数量不正确!');
theForm.item(queryqty).focus();
return;
}
theForm.seq.value=x;
theForm.mod.value="save";
theForm.submit();
}
function bsubmit(){
if (theForm.StartWith.value==""){
alert("搜索内容不能为空!")
theForm.StartWith.focus();
return;
}
theForm.submit();
}
</Script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=stylesheet type=text/css>
</head>
<body>
<form name="theForm" method="Post" action="">
<input type=hidden name=seq>
<input type=hidden name=mod>
<table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100%">
<select name="Find" width="10">
<option value=model <%if request("Find")="product" then Response.Write "selected"%>>型号</option>
<option value=productcode <%if request("Find")="productcode" then Response.Write "selected"%>>货号</option>
</select>
<input type="Text" name="StartWith" size="16" value="<%=request("StartWith")%>">
<input type="button" value="搜索" onclick="javascript:bsubmit();">
<input type="hidden" name="theForm" value="<%=theForm%>"> <input type="hidden" name="theName" value="<%=theName%>"> </td>
<tr bgcolor="#FFFFFF">
<td height="25"><strong><font size="2" class="title">产品选择</font></strong></td>
</tr>
<tr >
<td height="16" background="../images/title.gif"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td height=4></td>
</tr>
</table>
<table width="100%" bgcolor=cdcdcd cellspacing=1>
<tr bgcolor=efefef>
<td align=center height=22 >型号</td>
<td align=center width="20%">查询数量</td>
<td align=center width="12%">市场价</td>
</tr>
<%
submit = Request.Form("theName")
submit = trim(submit)
'if submit <>"" then
dim sql
Find = Request.Form("Find")
StartWith = Request.Form("StartWith")
if Find <>"" then
strwhere=" and " & Find & " like N'%" + trim(StartWith) + "%'"
sql = "select top 20 model,retail_price from v_product where disable=0 "&strwhere
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
rs.Open sql,conn,1,1
set model=rs("model")
set retail_price=rs("retail_price")
i=1:do while not rs.EOF
%>
<tr bgcolor=white>
<input name="model<%=i%>" type=hidden value="<%=model%>">
<td align="center"><a href="javascript:pickup2('<%=i%>');"><%=model%></a></td>
<td align="center"><input name=queryqty<%=i%> size=8></td>
<td align="center"><%=Retail_Price%></td>
</tr>
<%
i=i+1
rs.MoveNext
loop
rs.close
Set rs = nothing
conn.Close
set conn = nothing
end if
%>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -