📄 selectaccountcontact.asp
字号:
<td align=center>仓库</td>
<td align=center>货号</td>
<td align=center>型号</td>
<td align=center>在库量</td>
<td align=center>保留量</td>
<td align=center>可用量</td>
<td align=center>非净货位</td>
<%
elseif instr(theName,"location")>0 then
%>
<td align=center height=20>货位</td>
<td align=center>仓库</td>
<td align=center>货位类型</td>
<td align=center>非净货位</td>
<%
elseif instr(theName,"location")>0 then
%>
<td align=center height=20>货位</td>
<td align=center>仓库</td>
<td align=center>货位类型</td>
<td align=center>非净货位</td>
<%
elseif instr(theName,"order")>0 then
%>
<td align=center height=20>合同号</td>
<td align=center>客户</td>
<td align=center>金额</td>
<td align=center>状态</td>
<td align=center>签订日期</td>
<td align=center>销售员</td>
<%
elseif instr(theName,"deal")>0 then
%>
<td align=center height=20>销售机会</td>
<td align=center>主题</td>
<td align=center>客户</td>
<td align=center>金额</td>
<td align=center>状态</td>
<td align=center>开始日期</td>
<td align=center>销售员</td>
<%
end if
%>
</tr>
<%
submit = Request.Form("theName")
submit = trim(submit)
'if submit <>"" then
dim sql
Find = Request.Form("Find")
StartWith = Request.Form("StartWith")
strwhere=" where "&thefield&"="&thevalue
if Find <>"" then
strwhere=strwhere&" and " & Find & " like N'%" + trim(StartWith) + "%'"
end if
if instr(theName,"owner") or instr(theName,"user")>0 then
sql = "select * from usertable"&strwhere
elseif instr(theName,"account") then
sql = "select * from v_account"&strwhere
elseif instr(theName,"contact") then
sql = "select * from v_contact"&strwhere
elseif instr(theName,"PO") then
sql = "select * from v_po"&strwhere
elseif instr(theName,"sendlocation") then
strwhere=strwhere+" and productid="&theid
sql = "select * from vw_product_location "&strwhere
elseif instr(theName,"location") then
sql = "select * from v_location "&strwhere
elseif instr(theName,"order") then
sql = "select * from v_order "&strwhere
elseif instr(theName,"deal") then
sql = "select * from v_deal "&strwhere
end if
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring
rs.Open sql,conn,1,1
if not rs.EOF and not rs.BOF then
while not rs.EOF
%>
<tr bgcolor=white>
<%if instr(theName,"owner")>0 or instr(theName,"user")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("username")%>','<%=rs("loginid")%>');"><%= rs("loginid")%></a></td>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("username")%>','<%=rs("loginid")%>');"><%= rs("UserName")%></a></td>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("username")%>','<%=rs("loginid")%>');"><%= rs("title")%></a></td>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("username")%>','<%=rs("loginid")%>');"><%= rs("Territory")%></a></td>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("username")%>','<%=rs("loginid")%>');"><%= rs("phone")%></a></td>
<%elseif instr(theName,"account")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("account")%>','<%=rs("accountid")%>');"><%= rs("account")%></a></td>
<td align="center" nowrap><%= rs("Siccode")%></td>
<td align="center" nowrap><%= rs("industry")%></td>
<td align="center" nowrap><%= rs("accounttype")%></td>
<td align="center" nowrap><%= rs("phone")%></td>
<%elseif instr(theName,"contact")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("contact")%>','<%=rs("contactid")%>');"><%= rs("contact")%></a></td>
<td align="center" nowrap><%= rs("contactdepartment")%></td>
<td align="center" nowrap><%= rs("title")%></td>
<td align="center" nowrap><%= rs("workphone")%></td>
<td align="center" nowrap><%= rs("account")%></td>
<%elseif instr(theName,"PO")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("pono")%>','<%=rs("poid")%>');"><%= rs("pono")%></a></td>
<td align="center" nowrap><%= rs("account")%></td>
<td align="center" nowrap><%= rs("totalamount")%></td>
<td align="center" nowrap><%= rs("status")%></td>
<td align="center" nowrap><%= rs("podate")%></td>
<td align="center" nowrap><%= rs("owner")%></td>
<%elseif instr(theName,"sendlocation")>0 then%>
<td align="center" nowrap><a href="javascript:pickup3('<%=rs("location")%>','<%=rs("locationid")%>','<%=rs("qty_on_hand")-rs("qty_rsvd")%>');"><%= rs("location")%></a></td>
<td align="center" nowrap><%= rs("whse")%></td>
<td align="center" nowrap><%= rs("productcode")%></td>
<td align="center" nowrap><%= rs("model")%></td>
<td align="center" nowrap><%= rs("qty_on_hand")%></td>
<td align="center" nowrap><%= rs("qty_rsvd")%></td>
<td align="center" nowrap><%= rs("qty_on_hand")-rs("qty_rsvd")%></td>
<td align="center" nowrap><%= rs("nonnet")%></td>
<%elseif instr(theName,"location")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("location")%>','<%=rs("locationid")%>');"><%= rs("location")%></a></td>
<td align="center" nowrap><%= rs("whse")%></td>
<td align="center" nowrap><%= rs("locationtype")%></td>
<td align="center" nowrap><%= rs("nonnet")%></td>
<%elseif instr(theName,"order")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("ordernum")%>','<%=rs("orderid")%>');"><%= rs("ordernum")%></a></td>
<td align="center" nowrap><%= rs("account")%></td>
<td align="center" nowrap><%= rs("totalamount")%></td>
<td align="center" nowrap><%= rs("status")%></td>
<td align="center" nowrap><%= rs("signeddate")%></td>
<td align="center" nowrap><%= rs("owner")%></td>
<%elseif instr(theName,"deal")>0 then%>
<td align="center" nowrap><a href="javascript:pickup2('<%=rs("deal")%>','<%=rs("dealid")%>');"><%= rs("deal")%></a></td>
<td align="center" nowrap><%= rs("subject")%></td>
<td align="center" nowrap><%= rs("account")%></td>
<td align="center" nowrap><%= rs("totalamount")%></td>
<td align="center" nowrap><%= rs("status")%></td>
<td align="center" nowrap><%= rs("opendate")%></td>
<td align="center" nowrap><%= rs("owner")%></td>
<%end if%>
</tr>
<%
rs.MoveNext
wend
%>
</table>
<%
else
Response.Write "<table width=100% cellspacing=1><tr bgcolor=white><td >无记录</td></tr></table>"
end if
rs.close
Set rs = nothing
conn.Close
set conn = nothing
'end if
%>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -