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

📄 kcquest.asp

📁 《网上商品交易系统》 开发及测试环境 操作系统:Windows 2000 Server 后台数据库:SQL Server 2000 Web服务器:IIS 5.0  《网上商品交易系统》
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/sell.asp" -->
<%
'根据用户选择设置查询条件
if Request("cif")<>"" and Request("ccif")<>"" and Request("qvalue")<>"" then
varvalue= ""
if (Request("qvalue") <> "") then varvalue = Request("qvalue")  
varcif= ""
if (Request("cif") <> "") then varcif = Request("cif")  
varccif = "ALL"
if (Request("ccif") <> "") then varccif = Request("ccif") 
else
	varccif = "ALL"
end if
set rskcinfo = Server.CreateObject("ADODB.Recordset")
if varccif = "LIKE" then
	sql = "SELECT *  FROM dbo.tab_kucun  WHERE " + Replace(varcif, "'", "''") + " " +_
	 Replace(varccif, "'", "''") + "  '%" + Replace(varvalue, "'", "''") + "%'"
else
	if varccif = "ALL" then
		sql = "SELECT *  FROM dbo.tab_kucun"
	else
		sql = "SELECT *  FROM dbo.tab_kucun WHERE " + Replace(varcif, "'", "''") + " " +_
		 Replace(varccif, "'", "''") + "  '" + Replace(varvalue, "'", "''") + "'"
	end if
end if
rskcinfo.open sql,conn,1,3
%>

<html>
<head>
<title>明日企业网上销售管理系统--供应商信息查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style.css" rel="stylesheet">
</head>
<body bgcolor="#FFFFFF" text="#000000" background="../../images/bg.gif">
<script language="JavaScript">
function listall()
{form1.ccif.value = "ALL";
form1.submit();
}
</script>
<table width="590" border="0" cellspacing="-2" cellpadding="-2" height="311">
  <tr> 
    <td height="40"> 
      <h2 style="filter:glow(color=#ccccff,strength=5);height:1pt"align="center">
	  <font size="2" color=#000099> 
        库存信息查询</font></h2>
    </td>
  </tr>
  <tr> 
    <td valign="top"> 
      <table width="590" border="0" cellspacing="-2" cellpadding="-2" height="247">
        <tr> 
          <td width="590" height="28"> 
            <form name="form1" method="post" action="kcquest.asp">
              <div align="center">请选择查询条件: 
                <select name="cif">
                  <option value="ID">商品编号</option>
                  <option value="spname" selected>商品名称</option>
                  <option value="jc">简称</option>
                  <option value="kcsl">库存数量</option>
                </select>
                <select name="ccif">
                  <option value="=" selected>等于</option>
                  <option value="LIKE">LIKE</option>
                  <option value="ALL">ALL</option>
                  <option value="&gt;">大于</option>
                  <option value="&lt;">小于</option>
                </select>
                <input type="text" name="qvalue">
                <input type="submit" name="Submit" value="查询">
                <input type="button" name="Submit2" value="显示全部数据" onclick="listall()">
              </div>
            </form>
          </td>
        </tr>
        <tr> 
          <td height="78"> 
		<% totalje=0 
		total=0
		While NOT rskcinfo.EOF 
		totalje=totalje+rskcinfo("kcje") %>
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td>&nbsp;</td>
              </tr>
            </table>
            <table width="590" border=1 bordercolor=#ffffff bordercolordark=#ffffff 
                  bordercolorlight=#0099ff cellpadding=-1 cellspacing=0 height="54" align="center">
              <tr bgcolor="#dddddd"> 
                <td bgcolor="#D9ECFF"><font color="#336699">商品名称:
				<%=(rskcinfo("spname"))%></font></td>
                <td bgcolor="#D9ECFF"><font color="#336699">简称:
				<%=(rskcinfo("jc"))%></font></td>
                <td bgcolor="#D9ECFF" width="185"><font color="#336699">产地:
				<%=(rskcinfo("cd"))%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="208" bgcolor="#D9ECFF" height="17"><font color="#336699">规格:
				<%=(rskcinfo("gg"))%></font></td>
                <td width="189" bgcolor="#D9ECFF" height="17"><font color="#336699">包装:
				<%=(rskcinfo("bz"))%></font></td>
                <td bgcolor="#D9ECFF" width="185" height="17"><font color="#336699">单位:
				<%=(rskcinfo("dw"))%></font></td>
              </tr>
              <tr bgcolor="#dddddd"> 
                <td width="208" bgcolor="#D9ECFF"><font color="#336699">单价:
				<%=(rskcinfo("dj"))%></font></td>
                <td width="189" bgcolor="#D9ECFF"><font color="#336699">库存数量:
				<%=(rskcinfo("kcsl"))%></font></td>
                <td bgcolor="#D9ECFF" width="185"><font color="#336699">库存金额:
				<%=(rskcinfo("kcje"))%></font></td>
              </tr>
            </table>
           <% total=total+1
		    rskcinfo.MoveNext()
			Wend%>
            <table width="590" border="0" cellspacing="-2" cellpadding="-2">
              <tr> 
                <td width="197"> <font color="#00CCFF">
                  <% If Not rskcinfo.EOF Or Not rskcinfo.BOF Then %>
                  合计金额:<%=totalje %> 
                  <% End If%>
                  </font> </td>
                <td width="393">&nbsp; 
                  <div align="right"> 
                    <% If Not rskcinfo.EOF Or Not rskcinfo.BOF Then %>
                    <font color="#00CCFF">共 <%=(total)%> 条库存商品信息</font> 
                    <% End If%>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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