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

📄 kehu_ed.asp

📁 ASP数据库系统开发案例精选(光盘)中的客户关系管理系统 用户名/密码:admin/admin
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file=DataBase/conn.asp-->
<!--#include file=config.asp-->
<%
set rsr=server.CreateObject("adodb.recordset")
sqlr="select * from tb_User where username='"&session("admin_name")&"'"
rsr.open sqlr,conn,1,1

if request("id")="" then 
response.end
end if
if request("post")<>"" and (rsr("Client")="可写" or rsr("chaoji")="是") then
set rs=server.CreateObject("adodb.recordset")
sql="select * from tb_Client where id="&request("id")
rs.open sql,conn,1,3


rs("ClientName")=request("ClientName")
rs("ClientAddress")=request("ClientAddress")
rs("ClientTel")=request("ClientTel")
rs("ClientFax")=request("ClientFax")
rs("ClientNumber")=request("ClientNumber")
rs("ClientPage")=request("ClientPage")
rs("ClientEmail")=request("ClientEmail")
rs("ClientCountry")=request("ClientCountry")
rs("ClientHabitude")=request("ClientHabitude")
rs("ClientSize")=request("ClientSize")
rs("ClientCity")=request("ClientCity")
rs("ClientPay")=request("ClientPay")
rs("ClientCredit")=request("ClientCredit")
rs("ClientList")=request("ClientList")
rs("ClientYear")=request("ClientYear")
rs("ClientCyc")=request("ClientCyc")
rs("EditTime")=now()
rs("SetName")=session("admin_name")
rs.update
rs.close

response.Write("<script language=javascript>alert('客户信息修改成功')</script>")
end if
set rsx=server.CreateObject("adodb.recordset")
sqlx="select * from tb_Client where id="&request("id")
rsx.open sqlx,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	background-color: #DFEEFF;
}
body,td,th {
	font-size: 12px;
}
-->
</style>
<link href="css/css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {color: #FF0000}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #0000FF;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
-->
</style>
</head>
<script language="javascript">
function checks()
{
 if(form1.ClientName.value=="")
	{
		alert("公司名称不能为空");
		return false;
	}
	 else if(form1.ClientTel.value=="")
	{
		alert("公司电话不能为空");
		return false;
	}
		 else if(form1.ClientAddress.value=="")
	{
		alert("公司地址不能为空");
		return false;
	}
		 else if(form1.ClientCountry.value=="")
	{
		alert("国家地区不能为空");
		return false;
	}
		 else if(form1.ClientCity.value=="")
	{
		alert("所在城市不能为空");
		return false;
	}
		 else if(form1.ClientCity.value=="")
	{
		alert("E-mail不能为空");
		return false;
	}
		 else if(form1.ClientFax.value=="")
	{
		alert("公司传真不能为空");
		return false;
	}
		 else if(form1.ClientNumber.value=="")
	{
		alert("公司邮政编码不能为空");
		return false;
	}
		 else if(form1.ClientPage.value=="")
	{
		alert("公司网址不能为空");
		return false;
	}
		 else if(form1.ClientList.value=="")
	{
		alert("最高订单不能为空");
		return false;
	}	 else if(form1.ClientYear.value=="")
	{
		alert("年度订单不能为空");
		return false;
	}
		 else if(form1.ClientCyc.value=="")
	{
		alert("需求周期不能为空");
		return false;
	}

		
}
</script>
<body >
<form name="form1" method="post" action="">
<fieldset class="fiedset">
  <legend>客户信息</legend>
  <table width="970" height="249"  border="0" align="center" cellspacing="0" bgcolor="#efefef" class="table">
  <tr align="center" bgcolor="#efefef">
      <td height="30" colspan="8">        <table width="99%"  border="0" align="right" cellspacing="0">
          <tr>
            <td width="69%"><table width="654"  border="0">
              <tr>
                <td width="12%">创建日期:</td>
                <td width="25%"><%=rsx("SetTime")%></td>
                <td width="11%">修改日期:</td>
                <td width="26%"><%=rsx("EditTime")%></td>
                <td width="9%">创建人:</td>
                <td width="17%"><%=rsx("SetName")%></td>
              </tr>
            </table></td>
            <td width="22%"><a href="KeHu_Linkman_addy.asp?id=<%=rsx("id")%>"><span class="style2">新建</span></a> <a href="KeHu_Linkman.asp?post=true&sel=LinkmanClient&search=<%=rsx("id")%>&dd=dd" >联系人信息</a>  <a href="KeHu_Pact_addy.asp?id=<%=rsx("id")%>"><span class="style2">新建</span></a> <a href="KeHu_Pact.asp?post=true&sel=PactClient&search=<%=rsx("id")%>&dd=dd" >合同信息</a> </td>
            <td width="9%"><%if rsr("Client")="可写" or rsr("chaoji")="是" then%> <input name="Submit" type="submit" class="input" value="修改" onClick="return checks()"><%end if%></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td width="18%"  height="30" align="right" bgcolor="#FFFFFF">公司名称:</td>
      <td colspan="3" bgcolor="#FFFFFF"  ><input name="ClientName" type="text" class="in" id="ClientName" value="<%=rsx("ClientName")%>" size="30">
      <input name="post" type="hidden" id="post" value="true"></td>
      <td width="7%" align="right" bgcolor="#FFFFFF">公司电话:</td>
      <td colspan="3" bgcolor="#FFFFFF">        <input name="ClientTel" type="text" class="in" id="ClientTel3" value="<%=rsx("ClientTel")%>" size="30"></td>
    </tr>
    <tr>
      <td height="30" align="right" bgcolor="#FFFFFF">公司地址:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientAddress" type="text" class="in" id="ClientAddress" value="<%=rsx("ClientAddress")%>" size="30"></td>
      <td align="right" bgcolor="#FFFFFF">国家地区:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientCountry" type="text" class="in" id="ClientCountry" value="<%=rsx("ClientCountry")%>" size="30"></td>
    </tr>
    <tr>
      <td height="30" align="right" bgcolor="#FFFFFF">所在城市:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientCity" type="text" class="in" id="ClientCity2" value="<%=rsx("ClientCity")%>" size="30"></td>
      <td align="right" bgcolor="#FFFFFF">E-mail:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientEmail" type="text" class="in" id="ClientEmail" value="<%=rsx("ClientEmail")%>" size="30"></td>
    </tr>
    <tr>
      <td height="30" align="right" bgcolor="#FFFFFF">公司传真:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientFax" type="text" class="in" id="ClientFax" value="<%=rsx("ClientFax")%>" size="30"></td>
      <td align="right" bgcolor="#FFFFFF">邮政编码:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientNumber" type="text" class="in" id="ClientNumber" value="<%=rsx("ClientNumber")%>" size="30" maxlength="6"></td>
    </tr>
    <tr>
      <td height="30" align="right" bgcolor="#FFFFFF">公司网址:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientPage" type="text" class="in" id="ClientPage2" value="<%=rsx("ClientPage")%>" size="30"></td>
      <td align="right" bgcolor="#FFFFFF">最高订单:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientList" type="text" class="in" id="ClientList4" value="<%=rsx("ClientList")%>" size="30"></td>
    </tr>
    <tr>
      <td height="30" align="right" bgcolor="#FFFFFF">年度订单:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientYear" type="text" class="in" id="ClientYear3" value="<%=rsx("ClientYear")%>" size="30"></td>
      <td align="right" bgcolor="#FFFFFF">需求周期:</td>
      <td colspan="3" bgcolor="#FFFFFF"><input name="ClientCyc" type="text" class="in" id="ClientCyc2" value="<%=rsx("ClientCyc")%>" size="30"></td>
    </tr>
    <tr>
      <td height="30" align="right" bgcolor="#FFFFFF">公司规模:</td>
      <td width="10%" bgcolor="#FFFFFF"><select name="ClientSize" id="ClientSize">
        <option value="大" <%if rsx("ClientSize")="大" then%>selected<%end if%>>大</option>
        <option value="中" <%if rsx("ClientSize")="中" then%>selected<%end if%>>中</option>
        <option value="小" <%if rsx("ClientSize")="小" then%>selected<%end if%>>小</option>
      </select></td>
      <td width="7%" align="center" bgcolor="#FFFFFF">企业性质:</td>
      <td width="20%" bgcolor="#FFFFFF"><select name="ClientHabitude" id="select">
        <option value="外企" <%if rsx("ClientHabitude")="外企" then%>selected<%end if%>>外企</option>
        <option value="国企" <%if rsx("ClientHabitude")="国企" then%>selected<%end if%>>国企</option>
        <option value="民营" <%if rsx("ClientHabitude")="民营" then%>selected<%end if%>>民营</option>
        <option value="私营" <%if rsx("ClientHabitude")="私营" then%>selected<%end if%>>私营</option>
      </select></td>
      <td align="right" bgcolor="#FFFFFF">结款方式:</td>
      <td width="11%" bgcolor="#FFFFFF"><select name="ClientPay" id="ClientPay">
        <option value="现金" <%if rsx("ClientPay")="现金" then%>selected<%end if%>>现金</option>
        <option value="支票" <%if rsx("ClientPay")="支票" then%>selected<%end if%>>支票</option>
        <option value="汇票" <%if rsx("ClientPay")="汇票" then%>selected<%end if%>>汇票</option>
            </select></td>
      <td width="8%" align="center" bgcolor="#FFFFFF">结款信用:</td>
      <td width="19%" bgcolor="#FFFFFF"><select name="ClientCredit" id="select2">
        <option value="好" <%if rsx("ClientCredit")="好" then%>selected<%end if%>>好</option>
        <option value="中" <%if rsx("ClientCredit")="中" then%>selected<%end if%>>中</option>
        <option value="差" <%if rsx("ClientCredit")="差" then%>selected<%end if%>>差</option>
            </select></td>
    </tr>
  </table>

  <table width="90%" height="5"  border="0" align="center">
    <tr>
      <td></td>
    </tr>
  </table>
</fieldset>
</form>
</body>
</html>

⌨️ 快捷键说明

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