?? table_cl.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file=DataBase/conn.asp-->
<%
'客戶打印查詢
select case request("eeeet")
case "print_c"
sql="id is not null"
if request("ClientCountry")<>"全部" then'國家/地區不為全部時
sql=sql&" and ClientCountry='"&request("ClientCountry")&"'"
end if
if request("ClientCity")<>"全部" then '城市不為全部時
sql=sql&" and ClientCity='"&request("ClientCity")&"'"
end if
if request("SetName")<>"全部" then '客戶名稱不為全部時
sql=sql&" and SetName='"&request("SetName")&"'"
end if
if trim(request("search"))<>"" then '當關鍵字不為空時
sql=sql&" and "&request("searchtype")&" like '%"&request("search")&"%'"
end if
sql="select * from tb_Client where "&sql
response.Redirect("Table_print_p.asp?sql="&sql)'把參數傳給打印頁面
'客戶下載查詢
case "Excel"
sql="id is not null"
if request("ClientCountry")<>"全部" then'國家/地區不為全部時
sql=sql&" and ClientCountry='"&request("ClientCountry")&"'"
end if
if request("ClientCity")<>"全部" then '城市不為全部時
sql=sql&" and ClientCity='"&request("ClientCity")&"'"
end if
if request("SetName")<>"全部" then '客戶名稱不為全部時
sql=sql&" and SetName='"&request("SetName")&"'"
end if
if trim(request("search"))<>"" then '當關鍵字不為空時
sql=sql&" and "&request("searchtype")&" like '%"&request("search")&"%'"
end if
sql="select ClientName,ClientCountry,ClientCity,ClientTel,ClientFax,ClientEmail from tb_Client where "&sql
response.Redirect("Table_print_Cd.asp?sql="&sql&"&tt=Excel")'把參數傳給下載頁面
'聯系人打印查詢
case "print_l"
sql="dbo.tb_Linkman.id is not null"
if request("LinkmanDept")<>"全部" then
sql=sql&" and dbo.tb_Linkman.LinkmanDept='"&request("LinkmanDept")&"'"
end if
if request("LinkmanDuty")<>"全部" then
sql=sql&" and dbo.tb_Linkman.LinkmanDuty='"&request("LinkmanDuty")&"'"
end if
if request("select2")<>"全部" then
sql=sql&" and dbo.tb_Linkman.SetName='"&request("SetName")&"'"
end if
sql="SELECT dbo.tb_Linkman.LinkmanName, dbo.tb_Client.ClientName,dbo.tb_Linkman.LinkmanDept, dbo.tb_Linkman.LinkmanDuty,dbo.tb_Linkman.LinkmanTel, dbo.tb_Linkman.LinkmanHander, dbo.tb_Linkman.LinkmanEmail FROM dbo.tb_Client INNER JOIN dbo.tb_Linkman ON dbo.tb_Client.ID = dbo.tb_Linkman.LinkmanClient where "&sql
response.Redirect("Table_print_kh.asp?sql="&sql)
'聯系人下載查詢
case "Excel_l"
sql="dbo.tb_Linkman.id is not null"
if request("LinkmanDept")<>"全部" then
sql=sql&" and dbo.tb_Linkman.LinkmanDept='"&request("LinkmanDept")&"'"
end if
if request("LinkmanDuty")<>"全部" then
sql=sql&" and dbo.tb_Linkman.LinkmanDuty='"&request("LinkmanDuty")&"'"
end if
if request("select2")<>"全部" then
sql=sql&" and dbo.tb_Linkman.SetName='"&request("SetName")&"'"
end if
sql="SELECT dbo.tb_Linkman.LinkmanName, dbo.tb_Client.ClientName,dbo.tb_Linkman.LinkmanDept, dbo.tb_Linkman.LinkmanDuty,dbo.tb_Linkman.LinkmanTel, dbo.tb_Linkman.LinkmanHander, dbo.tb_Linkman.LinkmanEmail FROM dbo.tb_Client INNER JOIN dbo.tb_Linkman ON dbo.tb_Client.ID = dbo.tb_Linkman.LinkmanClient where "&sql
response.Redirect("Table_print_Cd.asp?sql="&sql&"&tt=Excel_l")
'客戶反饋打印查詢
case "print_k"
ktime=request("year")&"-"&request("month")&"-"&request("day")
jtime=request("year1")&"-"&request("month1")&"-"&request("day1")
sql="dbo.tb_Feedback.id is not null"
sql=sql&" and dbo.tb_Feedback.FeedbackDate between'"&ktime&"' and '"&jtime&"' order by "&request("xingshi")&" "&request("shunxu")&" "
sql="SELECT dbo.tb_Feedback.FeedbackTitle, dbo.tb_Feedback.FeedbackDate,dbo.tb_Client.ClientName, dbo.tb_Feedback.FeedbackContent, dbo.tb_Feedback.FeedbackFulfill, dbo.tb_Feedback.FeedbackResult FROM dbo.tb_Feedback INNER JOIN dbo.tb_Client ON dbo.tb_Feedback.FeedbackClient = dbo.tb_Client.ID where "&sql
response.Redirect("Table_print_fk.asp?sql="&sql)
'客戶反饋下載查詢
case "Excel_k"
ktime=request("year")&"-"&request("month")&"-"&request("day")
jtime=request("year1")&"-"&request("month1")&"-"&request("day1")
sql="dbo.tb_Feedback.id is not null"
sql=sql&" and dbo.tb_Feedback.FeedbackDate between'"&ktime&"' and '"&jtime&"' order by "&request("xingshi")&" "&request("shunxu")&" "
sql="SELECT dbo.tb_Client.ClientName, dbo.tb_Feedback.FeedbackDate,dbo.tb_Feedback.FeedbackFulfill,dbo.tb_Feedback.FeedbackTitle, dbo.tb_Feedback.FeedbackContent, dbo.tb_Feedback.FeedbackResult FROM dbo.tb_Feedback INNER JOIN dbo.tb_Client ON dbo.tb_Feedback.FeedbackClient = dbo.tb_Client.ID where "&sql
response.Redirect("Table_print_cd.asp?sql="&sql&"&tt=Excel_k")
'庫存打印查詢
case "print_kc"
ktime1=request("year2")&"-"&request("month2")&"-"&request("day2")
jtime1=request("year3")&"-"&request("month3")&"-"&request("day3")
sql="dbo.tb_Stockpile.id is not null"
if request("ProductNumber")<>"全部" then
sql=sql&" and dbo.tb_Product.ProductNumber='"&request("ProductNumber")&"'"
end if
if request("StockpileType")<>"全部" then
sql=sql&" and dbo.tb_Stockpile.StockpileType='"&request("StockpileType")&"'"
end if
sql=sql&" and dbo.tb_Stockpile.SetTime between'"&ktime1&"' and '"&jtime1&"' order by dbo.tb_Product."&request("xingshi1")&" "&request("shunxu1")&" "
sql="SELECT dbo.tb_Product.ProductNumber, dbo.tb_Product.ProductName,dbo.tb_Stockpile.StockpileProductNumber, dbo.tb_Product.ProductUnit,dbo.tb_Stockpile.StockpileType FROM dbo.tb_Stockpile INNER JOIN dbo.tb_Product ON dbo.tb_Stockpile.StockpileProductName = dbo.tb_Product.id where "&sql
response.Redirect("Table_print_kc.asp?sql="&sql&"&tt=print_kc")
'庫存下載查詢
case "Excel_kc"
ktime1=request("year2")&"-"&request("month2")&"-"&request("day2")
jtime1=request("year3")&"-"&request("month3")&"-"&request("day3")
sql="dbo.tb_Stockpile.id is not null"
if request("ProductNumber")<>"全部" then
sql=sql&" and dbo.tb_Product.ProductNumber='"&request("ProductNumber")&"'"
end if
if request("StockpileType")<>"全部" then
sql=sql&" and dbo.tb_Stockpile.StockpileType='"&request("StockpileType")&"'"
end if
sql=sql&" and dbo.tb_Stockpile.SetTime between'"&ktime1&"' and '"&jtime1&"' order by dbo.tb_Product."&request("xingshi1")&" "&request("shunxu1")&" "
sql="SELECT dbo.tb_Product.ProductNumber, dbo.tb_Product.ProductName,dbo.tb_Stockpile.StockpileProductNumber, dbo.tb_Product.ProductUnit,dbo.tb_Stockpile.StockpileType FROM dbo.tb_Stockpile INNER JOIN dbo.tb_Product ON dbo.tb_Stockpile.StockpileProductName = dbo.tb_Product.id where "&sql
response.Redirect("Table_print_cd.asp?sql="&sql&"&tt=Excel_kc")
end select
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -