Files
KIN/project/cli_search_2014.asp
2025-09-29 17:55:08 +09:00

138 lines
4.1 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
p_cli_company_nm = request("p_cli_company_nm")
query = " SELECT * "
query = query & " FROM V_CLIENT_COMP "
If p_cli_company_nm <> "" Then
query = query & " where p_cli_company_nm like '%" & p_cli_company_nm & "%' "
End if
query = query & " ORDER BY p_cli_company_nm "
rsc.Open query, adoConn, 1
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<LINK rel="stylesheet" type="text/css" href="/lib/text.css">
<title>
클라이언트 찾기
</title>
<script language=javascript>
function sltit(code, name, v) {
opener.document.pms.p_cli_company_cd.value = code;
opener.document.pms.p_cli_company_nm.value = name;
opener.search('cp_search_2014.asp?p_cli_company_cd=' + code + '&v=1', 'ClientPeopleSearch', 'width=390,height=381,left=100,top=50,scrollbars=yes');
self.close();
}
function search_cli() {
document.pms.cli_name.value = document.pms.cli_name.value.trim();
document.pms.submit();
}
function modit(z) {
var tmp_ok = 0;
var p_cli_company_cd = "";
if (z > 1) {
for (i = 1; i <= z; i++) {
if (document.pms.mod_cli[i - 1].checked == true) {
p_cli_company_cd = document.pms.mod_cli[i - 1].value;
tmp_ok = 1;
}
}
if (p_cli_company_cd == "") {
alert('Client를 선택해 주세요');
document.pms.mod_cli[0].focus();
return false;
}
}
else {
if (document.pms.mod_cli.checked == true) {
p_cli_company_cd = document.pms.mod_cli.value;
}
if (p_cli_company_cd == "") {
alert('Client를 선택해 주세요');
document.pms.mod_cli.focus();
return false;
}
}
document.pms.action = 'cli_new_2014.asp?p_cli_company_cd=' + p_cli_company_cd;
document.pms.submit();
}
function newit() {
document.pms.action = 'cli_new_2014.asp';
document.pms.submit();
}
function search(){
document.pms.action = 'cli_search_2014.asp';
document.pms.submit();
}
</script>
</head>
<body onLoad="javascript:document.pms.cli_name.focus();">
<form name="pms" method="post">
<!-- 클라이언트명을 추가 삭제하는 버튼입니다. -->
<%if tmp_admin_chk = "1" then %>
<div style="position: absolute; left: 10px; top: 4px; z-index: 10;">
<table border="0" cellspacing="0" cellpadding="0" width="335" bgcolor="white">
<tr align="center">
<td>
<input type="button" value="추가" onClick="newit()" style="CURSOR:pointer;" />
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="button" value="수정" onclick="modit('<%=rsc.RecordCount%>')" style="CURSOR:pointer;" />
</td>
</tr>
</table>
</div>
<%end if %>
<!-- --------------------------------------- -->
<br>
<div style="width: 335px; height: 300px; overflow-y: auto;">
<table border="1" cellspacing="0" cellpadding="0" width="335">
<tr>
<td colspan="3" align="center" height="20"><font color="red"><b>(추가등록은 IT에 문의)</b></font></td>
</tr>
<tr align="center" height="20">
<td width="20"></td>
<td width="40"><font color="blue"><b>코드</b></font></td>
<td><font color="blue"><b>클라이언트명</b></font></td>
</tr>
<%
for i = 1 to rsc.RecordCount
%>
<tr>
<td><input type="radio" name="mod_cli" value="<%=rsc("p_cli_company_cd")%>"></td>
<td align="center"><%=rsc("p_cli_company_cd")%></td>
<td>&nbsp;<a href="javascript:sltit('<%=rsc("p_cli_company_cd")%>','<%=rsc("p_cli_company_nm")%>')"><font color="blue"><%=rsc("p_cli_company_nm")%></font></a></td>
</tr>
<%
rsc.MoveNext
next
%>
</table>
</div>
<table border="1" cellspacing="0" cellpadding="0" width="335">
<tr align="center" height="20">
<td width="100">클라이언트명 : </td>
<td><input type="text" name="p_cli_company_nm" value="<%=p_cli_company_nm%>" /></td>
<td width="62"><input type="button" name="" value="검색" onclick="javascript:search();"/></td>
</tr>
</table>
<%
rsc.Close
set rsc = nothing
%>
</form>
</body>
</html>