📄 get_customer_id.asp
字号:
<!--#include file="../config.asp"-->
<!--#include file="../inc/check_login.asp"-->
<!--#include file="../inc/functions.asp"-->
<%
Application_ID = 1000100 '本功能编号,含义请查看编码表
if not CheckAuth(Session("Employee_ID"),Application_ID) then '验证权限
Server.Transfer "../err/un_authorized.htm"
response.end
end if
%>
<!--**************身份验证部分****************-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>选择客户</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" type="text/css" href="../style.css">
</head>
<body topmargin="2" leftmargin="2">
<%
queryCustomer_Name = request("queryCustomer_Name")
%>
<form action="get_customer_id.asp" method="post">
<table bgcolor="#ffffff" border=0 cellpadding=1 cellspacing=1 width="100%">
<tr>
<td>输入客户名称:</td>
<td><input type="text" name="queryCustomer_Name" value="<%= queryCustomer_Name %>" size="20"></td>
<td><input type="submit" name="Submit" value="查询"></td>
</tr>
</table>
<table bgcolor="#ffffff" border=0 cellpadding=1 cellspacing=1 width="100%">
<tr bgcolor="#EFEFEF">
<td>客户名称</td>
</tr>
<%
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.open connstr
sql = "select Customer_ID,Customer_Name from Customers where Available = 1 "
if IsNot(queryCustomer_Name,"s") then sql = sql & " and Customer_Name like '%" & queryCustomer_Name & "%'"
sql = sql & " order by Customer_ID DESC"
'response.write sql
rs.open sql,conn,1
if rs.eof then
response.write "<tr><td colspan=18>暂时没有记录</td></tr></table>"
response.end
end if
PageSize = request.Cookies("PageSize")
if not IsNot(PageSize,"n") then PageSize = DefaultPageSize
rs.pagesize = PageSize
PageCount = rs.PageCount
PageNo = request("PageNo")
if PageNo = "" or CInt(PageNo) < 1 then PageNo = 1
if CInt(PageNo) > PageCount then PageNo = PageCount
rs.absolutepage = PageNo
i = 0
while not rs.eof and i < rs.pagesize
Customer_ID = rs("Customer_ID")
ID_Pointer = Customer_ID
Customer_Name = rs("Customer_Name")
if i mod 2 = 0 then
bgcolor = "#FFFFFF"
else
bgcolor = "#EFEFEF"
end if
%>
<tr bgcolor="<%= bgcolor %>">
<td><a href="#" onClick="getCustomer('<%= Customer_ID %>','<%= Customer_Name %>');window.close();"><%= Customer_Name %></a></td>
</tr>
<%
i = i + 1
rs.movenext
wend
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
<tr bgcolor="#EFEFEF">
<td colspan="6">
<a href="get_customer_id.asp?PageNo=1&queryCustomer_Name=<%= queryCustomer_Name %>"><font face="Webdings">5</font>第一页</a>
<a href="get_customer_id.asp?PageNo=<%= PageNo -1 %>&queryCustomer_Name=<%= queryCustomer_Name %>"><font face="Webdings">3</font>上一页</a>
<a href="get_customer_id.asp?PageNo=<%= PageNo + 1 %>&queryCustomer_Name=<%= queryCustomer_Name %>"><font face="Webdings">4</font>下一页</a>
<a href="get_customer_id.asp?PageNo=<%= PageCount %>&queryCustomer_Name=<%= queryCustomer_Name %>"><font face="Webdings">6</font>最后一页</a>
</td>
</tr>
</table>
</form>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function getCustomer(Customer_ID,Customer_Name){
if(opener.frm.Customer_ID){
opener.frm.Customer_ID.value = Customer_ID;
opener.frm.Customer_Name.value = Customer_Name;
}
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -