?? stockpile_list.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<%
'接受的參數,默認為出庫
ty=request("ty")
if ty="" then
ty="出庫"
end if
if ty="庫存" then
set rs=server.CreateObject("adodb.recordset")
sql="SELECT dbo.tb_Stockpile.id,dbo.tb_Product.ProductNumber, dbo.tb_Product.ProductName,dbo.tb_Stockpile.StockpileProductNumber, dbo.tb_Stockpile.StockpileType,dbo.tb_Stockpile.SetTime FROM dbo.tb_Stockpile INNER JOIN dbo.tb_Product ON dbo.tb_Stockpile.StockpileProductName = dbo.tb_Product.id where (dbo.tb_Stockpile.StockpileProductName = "&request("id")&") ORDER BY dbo.tb_Stockpile.id DESC"
rs.open sql,conn,1,1
else
set rs=server.CreateObject("adodb.recordset")
sql="SELECT dbo.tb_Stockpile.id,dbo.tb_Product.ProductNumber, dbo.tb_Product.ProductName,dbo.tb_Stockpile.StockpileProductNumber, dbo.tb_Stockpile.StockpileType,dbo.tb_Stockpile.SetTime FROM dbo.tb_Stockpile INNER JOIN dbo.tb_Product ON dbo.tb_Stockpile.StockpileProductName = dbo.tb_Product.id WHERE (dbo.tb_Stockpile.StockpileType = '"&ty&"') AND (dbo.tb_Stockpile.StockpileProductName = "&int(request("id"))&") ORDER BY dbo.tb_Stockpile.id DESC"
rs.open sql,conn,1,1
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>無標題文檔</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
body {
background-color: #DFEEFF;
}
.style3 {color: #FFFFFF}
-->
</style></head>
<script language="javascript">
function HLItem(obj){
obj.oldClassName=obj.className;
obj.className="List";
}
function Re(obj){
obj.className=obj.oldClassName
}
</script>
<body>
<table width="100%" border="0" >
<tr>
<td valign="top"> <fieldset class="fiedset">
<legend>
<input name="radiobutton" type="radio" value="radiobutton" onClick="location='Stockpile_List.asp?id=<%=request("id")%>&ty=出庫'" <%if ty="出庫" then%> checked <%end if%>>
出庫列表
<input name="radiobutton" type="radio" value="radiobutton" onClick="location='Stockpile_List.asp?id=<%=request("id")%>&ty=入庫'" <%if ty="入庫" then%> checked <%end if%>>
入庫列表
<input type="radio" name="radiobutton" value="radiobutton" onClick="location='Stockpile_List.asp?id=<%=request("id")%>&ty=庫存'" <%if ty="庫存" then%> checked <%end if%>>
庫存記錄</legend>
<form name="form2" method="post" action="Stockpile_del.asp?p=<%=request("p")%>&ty=<%=ty%>&id=<%=request("id")%>">
<table width="90%" border="0" align="center" cellspacing="0">
<tr>
<td width="6%"><table width="100%" border="0" cellspacing="0" class="table">
<tr>
<td bgcolor="#000099" class="listTitle"> </td>
</tr>
<%
if not rs.eof then
tol=rs.recordcount
rs.pagesize=15
maxpage=rs.pagecount
requestpage=clng(request("p"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if requestpage<>1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.eof
if i mod 2=1 then
bg="#FFFFFF"
else
bg="#efefef"
end if
%>
<tr>
<td align="center" bgcolor=<%=bg%>><input name="del" type="checkbox" id="del" value="<%=rs("id")%>"></td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
else
response.Write(" ")
end if
%>
</table></td>
<td width="94%"><table width="100%" border="0" align="center" cellspacing="0" bordercolor="#FFFFFF" class="table">
<tr bordercolor="#ffffff" cellpadding="0">
<td width="19%" align="center" class="listTitle">產品編號</td>
<td width="19%" align="center" class="listTitle">產品名稱</td>
<td width="19%" align="center" class="listTitle">數量</td>
<td width="19%" align="center" class="listTitle">庫存類型</td>
<td width="19%" align="center" class="listTitle">登記時間</td>
</tr>
<%
if ty="庫存" then
set rs=server.CreateObject("adodb.recordset")
sql="SELECT dbo.tb_Stockpile.id,dbo.tb_Product.ProductNumber, dbo.tb_Product.ProductName,dbo.tb_Stockpile.StockpileProductNumber, dbo.tb_Stockpile.StockpileType,dbo.tb_Stockpile.SetTime FROM dbo.tb_Stockpile INNER JOIN dbo.tb_Product ON dbo.tb_Stockpile.StockpileProductName = dbo.tb_Product.id where (dbo.tb_Stockpile.StockpileProductName = "&request("id")&") ORDER BY dbo.tb_Stockpile.id DESC"
rs.open sql,conn,1,1
else
set rs=server.CreateObject("adodb.recordset")
sql="SELECT dbo.tb_Stockpile.id,dbo.tb_Product.ProductNumber, dbo.tb_Product.ProductName,dbo.tb_Stockpile.StockpileProductNumber, dbo.tb_Stockpile.StockpileType,dbo.tb_Stockpile.SetTime FROM dbo.tb_Stockpile INNER JOIN dbo.tb_Product ON dbo.tb_Stockpile.StockpileProductName = dbo.tb_Product.id WHERE (dbo.tb_Stockpile.StockpileType = '"&ty&"') AND (dbo.tb_Stockpile.StockpileProductName = "&int(request("id"))&") ORDER BY dbo.tb_Stockpile.id DESC"
rs.open sql,conn,1,1
end if
if not rs.eof then
tol=rs.recordcount
rs.pagesize=15
maxpage=rs.pagecount
requestpage=clng(request("p"))
if requestpage="" or requestpage=0 then
requestpage=1
end if
if requestpage>maxpage then
requestpage=maxpage
end if
if requestpage<>1 then
rs.move (requestpage-1)*rs.pagesize
end if
for i=1 to rs.pagesize and not rs.eof
if i mod 2=1 then
bg="#FFFFFF"
else
bg="#efefef"
end if
%>
<tr align="center" bgcolor=<%=bg%> style="cursor:hand" onClick="window.parent.frames('bo').window.location = 'Stockpile_ed.asp?id=<%=rs("id")%>'" onMouseOver="HLItem(this)" onMouseOut="Re(this)">
<td height="22"><%=rs("ProductNumber")%></td>
<td><%=rs("ProductName")%></td>
<td>
<%=rs("StockpileProductNumber")%>
</td>
<td>
<%=rs("StockpileType")%>
</td>
<td>
<%=rs("SetTime")%>
</td>
</tr>
<%
rs.movenext
if rs.eof then exit for
next
else
response.Write("沒有客戶信息,請<a href='Stockpile_add.asp' target='bo'>添加</a>")
end if
%>
</table></td>
</tr>
</table>
<table width="90%" border="0" align="center">
<tr>
<td width="37%"> </td>
<td width="63%" align="right"> <a href="Stockpile_List.asp?p=1&id=<%=request("id")%>&ty=<%=ty%>">首頁</a> <a href="Stockpile_List.asp?p=<%=requestpage-1%>&id=<%=request("id")%>&ty=<%=ty%>">上一頁</a> <a href="Stockpile_List.asp?p=<%=requestpage+1%>&id=<%=request("id")%>&ty=<%=ty%>">下一頁</a> <a href="Stockpile_List.asp?p=<%=maxpage%>&id=<%=request("id")%>&ty=<%=ty%>">最后一</a> 當前頁:<%=requestpage%> 總頁數:<%=maxpage%> 總客戶數:<%=tol%> 每頁顯示15條信息</td>
</tr>
</table>
</form>
<p><br>
</p>
</fieldset></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -