⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_contact_person_id.asp

📁 === ==ASP销售管理系统
💻 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">
<%
queryContact_Person_Name = request("queryContact_Person_Name")
Customer_ID = request("Customer_ID")
%>
<form action="get_contact_person_id.asp" method="post">
<input type="hidden" name="Customer_ID" value="<%= Customer_ID %>">
<table bgcolor="#ffffff" border=0 cellpadding=1 cellspacing=1 width="100%">
<tr>
	<td>输入客户联系人姓名:</td>
	<td><input type="text" name="queryContact_Person_Name" value="<%= queryContact_Person_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>
	<td>性别</td>
	<td>任职</td>
</tr>
<%
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
conn.open connstr
sql = "select Contact_Person_ID,Contact_Person_Name,Gender,Rank from Customers_Contact_Person where Contact_Person_ID > 0 "
if IsNot(Customer_ID,"n") then sql = sql & " and Customer_ID = " & Customer_ID
if IsNot(queryContact_Person_Name,"s") then sql = sql & " and Contact_Person_Name like '%" & queryContact_Person_Name & "%'"
sql = sql & " order by Contact_Person_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
	Contact_Person_ID = rs("Contact_Person_ID")
	ID_Pointer = Contact_Person_ID
	Contact_Person_Name = rs("Contact_Person_Name")
	Gender = rs("Gender")
	Rank = rs("Rank")
	if i mod 2 = 0 then
		bgcolor = "#FFFFFF"
	else
		bgcolor = "#EFEFEF"
	end if
	if Gender then
		Gender = "男"
	else
		Gender = "女"
	end if
	%>
	<tr bgcolor="<%=bgcolor%>">
		<td><a href="#" onClick="getContactPerson('<%=Contact_Person_ID%>','<%=Contact_Person_Name%>');window.close();"><%=Contact_Person_Name%></a></td>
		<td><%=Gender%></td>
		<td><%=Rank%></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_contact_person_id.asp?PageNo=1&Customer_ID=<%= Customer_ID %>&queryContact_Person_Name=<%= queryContact_Person_Name %>"><font face="Webdings">5</font>第一页</a>
	<a href="get_contact_person_id.asp?PageNo=<%= PageNo - 1 %>&Customer_ID=<%= Customer_ID %>&queryContact_Person_Name=<%= queryContact_Person_Name %>"><font face="Webdings">3</font>上一页</a>
	<a href="get_contact_person_id.asp?PageNo=<%= PageNo + 1 %>&Customer_ID=<%= Customer_ID %>&queryContact_Person_Name=<%= queryContact_Person_Name %>"><font face="Webdings">4</font>下一页</a>
	<a href="get_contact_person_id.asp?PageNo=<%= PageCount %>&Customer_ID=<%= Customer_ID %>&queryContact_Person_Name=<%= queryContact_Person_Name %>"><font face="Webdings">4</font>下一页</a>	
	</td>
</tr>
</table>
</form>
</body>
</html>
<script language="JavaScript" type="text/javascript">
	function getContactPerson(Contact_Person_ID,Contact_Person_Name){
		if(opener.frm.Contact_Person_ID){
			opener.frm.Contact_Person_ID.value = Contact_Person_ID;
			opener.frm.Contact_Person_Name.value = Contact_Person_Name;
		}
	}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -