?? mygoods.asp
字號:
<!--#include file="../include/top.asp"-->
<%
Set conn=Server.CreateObject("ADODB.Connection")
conn.connectionstring="Driver={Sql Server};Server=(local);UID=sa;database=DB_lsmanage"
conn.open
%>
<table width="100%">
<tr>
<td height="34" colspan="2" valign="middle" bgcolor="#FFCC66" align="left"> <img src="../images/borrow.gif"> <span class="style5">藥品入庫出庫庫存情況</span> </td>
</tr>
<tr>
<td colspan="4" valign="top"> <br>
<table width="80%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#66CCFF">
<tr>
<td colspan="5" valign="top">
<%
set rs0=conn.execute("select yName from tb_MedicineName")
i=1
do while not rs0.eof
set rs=conn.execute("select sum(Sl) from tb_Sell where yName='"&rs0(0)&"' and itType=1 and UserId="&Session("UserID"))
set rs1=conn.execute("select sum(Sl) from tb_Sell where yName='"&rs0(0)&"' and itType=2 and UserId="&Session("UserID"))
if isnull(rs(0)) then
response.write "<tr><td bgcolor=#ffffff>"&i&"</td><td bgcolor=#ffffff>"&rs0(0)&"</td><td bgcolor=#ffffff>入庫(<font color=red>0</font>)</td>"
if isnull(rs1(0)) then
response.write "<td bgcolor=#ffffff>出庫(<font color=red>0</font>)</td><td bgcolor=#ffffff>庫存(<font color=red>0</font>)</td></tr>"
end if
else
response.write "<tr><td bgcolor=#ffffff>"&i&"</td><td bgcolor=#ffffff>"&rs0(0)&"</td><td bgcolor=#ffffff>入庫(<font color=red>"&rs(0)&"</font>)</td>"
if isnull(rs1(0)) then
response.write "<td bgcolor=#ffffff>出庫(<font color=red>0</font>)</td><td bgcolor=#ffffff>庫存(<font color=red>"&rs(0)&"</font>)</td></tr>"
else
response.write "<td bgcolor=#ffffff>出庫(<font color=red>"&rs1(0)&"</font>)</td><td bgcolor=#ffffff>庫存(<font color=red>"&(rs(0)-rs1(0))&"</font>)</td></tr>"
end if
end if
rs0.movenext
i=i+1
loop
rs.close
rs0.close
%> </td>
</tr>
</table>
</table>
<!--#include file="../include/bottom.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -