?? view.asp
字號:
<!--#include virtual="/manage/include/top.asp"-->
<tr bgcolor="#dddddd">
<td height="1" colspan="4"></td>
</tr>
<tr>
<td height="34" colspan="2" valign="middle" bgcolor="#efefef">
<img src="/manage/images/borrow.gif"><strong> 連鎖店庫存查看<br>
</strong></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="184" colspan="4" valign="top">
<%
If Session("flag")<>1 Then
Response.Write "<script language=javascript>window.history.back();</script>"
Response.End()
End If
Set conn=Server.CreateObject("ADODB.Connection")
conn.connectionstring="Driver={Sql Server};Server=(local);UID=sa;database=DB_lsmanage"
conn.open
set rs1=conn.execute("select * from tb_MedicineName")
set rs2=conn.execute("select * from tb_User where UserId <> '1000'")
%><br>
<form action="<%=request.ServerVariables("PATH_INFO")%>" method="post" name="form1">
<table width="90%" border="0" align="center" cellpadding="6" cellspacing="1" bgcolor="#0099cc" bordercolorstark=#000000>
<tr>
<td bgcolor="#FFFFFF" align="center"> 條件搜索:
<select name="yName">
<option value="">選擇藥品名稱</option>
<%
do while not rs1.eof
%>
<option value=<%=rs1("yName")%>
<%
if request("yName")=rs1("yName") then
response.write " selected"
end if
%>><%=rs1("yName")%> </option>
<%
rs1.movenext
loop
%>
</select>
<select name="UserId">
<option value="">選擇連鎖店</option>
<%
do while not rs2.eof
%>
<option value=<%=rs2("UserId")%>
<%if request("UserId")=rs2("UserId") then
response.write " selected"
end if%>><%=rs2("UserName")%></option>
<%
rs2.movenext
loop
%>
</select>
<input name="submit" type="submit" style="border:1px solid;border-color:#4c99d4;background-color:#f2ebc3" value="搜 索"></td>
</tr>
</table>
</form>
<%
if request.ServerVariables("CONTENT_LENGTH")>0 then
yName=request("yName")
UserId=request("UserId")
strsql=" where itType=1 " '查詢入庫藥品
strsql1=" where itType=2 " '查詢出庫藥品
if len(yName)=0 then
strsql=strsql&" "
strsql1=strsql1&" "
else
strsql=strsql&" and yName='"&yName&"' "
strsql1=strsql1&" and yName='"&yName&"' "
end if
if len(UserId)=0 then
strsql=strsql&" "
strsql1=strsql1&" "
else
strsql=strsql&" and UserId='"&UserId&"' "
strsql1=strsql1&" and UserId='"&UserId&"' "
end if
strsql="select sum(Sl) from tb_Sell "&strsql '對銷售信息表中的入庫數量進行求和
strsql1="select sum(Sl) from tb_Sell "&strsql1 '對銷售信息表中的出庫數量進行求和
set rs=conn.execute(strsql)
set rs0=conn.execute(strsql1)
%><br>
<center><h3>
<%
if len(request("UserId"))>0 then
set rs3=conn.execute("select * from tb_User where UserId="&request("UserId"))
response.write "<font color=red>"&rs3("UserName")&"</font>"
if len(request("yName"))>0 then
response.write " 的 <font color=red>"&request("yName")&"</font> 庫存"
else
response.write " 的藥品庫存"
end if
else
if len(request("yName"))>0 then
response.write "<font color=red>"&request("yName")&"</font> 的庫存情況"
end if
end if
%>
</h3></center><br>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#0099cc" width="50%" align="center">
<tr>
<td bgcolor="#DBDBDB" align="center"><font color="#000000"><strong>入庫</strong></font></td>
<td bgcolor="#DBDBDB" align="center"><font color="#000000"><strong>出庫</strong></font></td>
<td bgcolor="#DBDBDB" align="center"><font color="#000000"><strong>庫存</strong></font></td>
</tr>
<tr>
<td bgcolor="#FFFFFF" align="center">
<%
if isnull(rs(0)) or rs(0)<=0 then
response.write 0
else
response.write rs(0)
end if
%>
</td>
<td bgcolor="#FFFFFF" align="center">
<%
if isnull(rs0(0)) or rs0(0)<=0 then
response.write 0
else
response.write rs0(0)
end if
%>
</td>
<td bgcolor="#FFFFFF" align="center">
<%if isnull(rs(0)) or rs(0)<=0 then%>
<%=0%>
<%
else
if isnull(rs0(0)) then
response.write rs(0)
else
%>
<%=rs(0)-rs0(0)%>
<%
end if
end if
%>
</td>
</tr>
</table>
<%end if%>
<!--#include virtual="/manage/include/bottom.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -