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

📄 custom_modify.jsp

📁 这是我老师布置一个学习任务:保险管理系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="connDB" scope="page" class="beans.connDB"/>
<jsp:useBean id="chStr" scope="page" class="beans.chStr"/>

<%
if (request.getParameter("custom_id")!=null){
      String custom_id=request.getParameter("custom_id");
      try{
      ResultSet rs=connDB.executeQuery("select * from Customer where custom_id='"+custom_id+"'"); 
    

      String custom_password="";
      String custom_property="";
      String custom_name="";
      String custom_address="";
      String custom_remark="";
      String leader="";
      String telephone="";
      String mobile_phone="";
      String fax="";
      String photo="";
      String register_date="";
      String user_id="";
      String communicating_company="";
	if(!rs.next()){
		out.println("<script lanuage='javascript'>alert('您的操作有误!');window.location.href='index.jsp';</script>");
	}else{
		custom_id=rs.getString("custom_id");
		custom_password=rs.getString("custom_password");
		custom_property=rs.getString("custom_property");
		custom_name=rs.getString("custom_name");
		custom_address=rs.getString("custom_address");		
		custom_remark=rs.getString("custom_remark");				
		leader=rs.getString("leader");
		telephone=rs.getString("telephone");
		mobile_phone=rs.getString("mobile_phone");
		fax=rs.getString("fax");
		photo=rs.getString("photo");		
		register_date=rs.getString("register_date");				
		user_id=rs.getString("user_id");
		communicating_company=rs.getString("communicating_company");
	}

  
           connDB.close();
	 }
        catch(Exception e){
          e.printStackTrace();
        }
%>
<html>
<head>
<title>PICC</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../CSS/style.css" rel="stylesheet">

</head>
<script language="javascript">
function mycheck(){
	if (form1.custom_id.value==""){
		alert("请输入客户号!");form1.custom_id.focus();return;
	}
	if (form1.custom_password.value==""){
		alert("请输入客户单位代码");form1.custom_password.focus();return;
	}
	if (form1.custom_property.value==""){
		alert("请输入客户性质!");form1.custom_property.focus();return;
	}
	if (form1.custom_name.value==""){
		alert("请输入客户名称!");form1.custom_name.focus();return;
	}	
	if (form1.custom_address.value==""){
		alert("请输入客户地址!");form1.custom_address.focus();return;
	}	
	if (form1.custom_remark.value==""){
		alert("请输入法人组织机构代码!");form1.custom_remark.focus();return;
	}
	if (form1.leader.value==""){
		alert("请输入法人代表!");form1.leader.focus();return;
	}	
	if (form1.telephone.value==""){
		alert("请输入电话号码!");form1.telephone.value="";form1.price.focus();return;
	}
	if (form1.mobile_phone.value==""){
		alert("请输入移动电话!");form1.mobile_phone.focus();return;
	}
	if (form1.fax.value==""){
		alert("请输入传真号码!");form1.fax.focus();return;
	}
	if (form1.photo.value==""){
		alert("请输入法人登记照片图片!");form1.photo.focus();return;
	}
	if (form1.register_date.value==""){
		alert("请输入登记日期!");form1.register_date.focus();return;
	}	
	if (form1.user_id.value==""){
		alert("请输入登记人!");form1.user_id.focus();return;
	}	
	if (form1.communicating_company.value==""){
		alert("请输入相关公司!");form1.communicating_company.focus();return;
	}		
	form1.submit();
}
</script>
<body bgcolor="#FFFFCC" leftmargin=10 topmargin="8" background="pictures/background.jpg">
<table width="100%"  border="0" cellspacing="0" cellpadding="0" background="pictures/bg.gif">
  <tr>
    <td>
<table width="777" height="609"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td valign="top">
	<jsp:include page="top.jsp"/>
	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="tableBorder_LTR">
      <tr>
        <td height="30" align="center" bgcolor="#eeeeee">≡≡≡ <a href="index.jsp">客户管理</a> ≡≡≡</td>
      </tr>
    </table>
	<table width="100%" height="396"  border="0" cellpadding="0" cellspacing="0" class="tableBorder_LBR">
        <tr>
          <td width="26%" height="395" valign="top"><table width="100%"  border="0" cellspacing="-2" cellpadding="-2">
            <tr>
              <td width="55%" height="82" align="center" class="word_grey">&nbsp;<img src="pictures/reg.gif" width="84" height="54"></td>
              <td width="45%" align="left" class="word_grey">修改客户信息</td>
            </tr>
            <tr>
              <td height="112" colspan="2" valign="top" class="word_grey"><ul>
                  <li> 客户号:客户的custom_id,请务必输入正确,此项不能修改。</li>
                  <li>登记日期:该用户注册的日期,格式。</li>
                  <li>客户名称:该客户的名称或者客户单位的名称</li>
                  </ul></td>
            </tr>
            <tr align="center">
              <td colspan="2" valign="middle" class="word_grey"></td>
            </tr>
          </table></td>
          <td width="5" valign="top" background="pictures/Cen_separate.gif"></td>
          <td width="73%" valign="top"><table width="100%" height="56"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center">&nbsp;</td>
            </tr>
            <tr>
              <td align="center">
			  <form action="custom_modify_deal.jsp" method="post">
			    <table width="100%"  border="0" align="center" cellpadding="-2" cellspacing="-2" bordercolordark="#FFFFFF">
                  <tr>
                    <td width="14%" height="27">客户号:</td>
                    <td height="27">&nbsp;
                      <input name="custom_id" type="text" id="custom_id" readonly="yes" value="<%=custom_id%>"></td>
                    <td height="27">客户单位代码</td>
                    <td height="27">&nbsp;
                          <input name="custom_password" type="text" id="custom_password">
                    </td>
                  </tr>
                  <tr>
                    <td height="27">客户性质</td>
                    <td width="25%" height="27">&nbsp;
                          <input name="custom_property" type="text" id="custom_property">
                    </td>
                    <td width="15%" height="27"> 客户名称</td>
                    <td width="46%" height="27">&nbsp;
                          <input name="custom_name" type="text" id="custom_name">
                    </td>
                  </tr>
                  <tr>
                    <td height="27">客户地址</td>
                    <td height="27">&nbsp;
                          <input name="custom_address" type="text" id="custom_address">
                    </td>
                    <td height="27">法人组织机构代码</td>
                    <td height="27">&nbsp;
                          <input name="custom_remark" type="text"  id="custom_remark">
                   </td>
                  </tr>
                  <tr>
                    <td height="27">法人代表</td>
                    <td height="27">&nbsp;
                          <input name="leader" type="text" id="leader">
                    </td>
                    <td height="27">电话号码</td>
                    <td height="27">&nbsp;
                          <input name="telephone" type="text" id="telephone"></td>
                  </tr>
                  
                  <tr>
                    <td height="27">移动电话</td>
                    <td height="27">&nbsp;
                          <input name="mobile_phone" type="text"  id="mobile_phone">
                    </td>
                    <td height="27">传真号码</td>
                    <td height="27">&nbsp;
                          <input name="fax" type="text"  id="fax">
                   </td>
                  </tr>
                  
                  <tr>
                    <td height="27">法人</td>
                    <td height="27">&nbsp;
                          <input name="photo" type="text" id="photo">
                    </td>
                    <td height="27">登记日期</td>
                    <td height="27">&nbsp;
                          <input name="register_date" type="text"  id="register_date">
                   </td>
                  </tr>
                  
                  <tr>
                    <td height="27">登记人</td>
                    <td height="27">&nbsp;
                          <input name="user_id" type="text" id="user_id">
                    </td>
                    <td height="27">相关公司</td>
                    <td height="27">&nbsp;
                          <input name="communicating_company" type="text" id="communicating_company">
                   </td>
                  </tr>
                  <tr>
                    <td height="38" colspan="4" align="center">
                        <input name="Button" type="submit" class="btn_grey" value="保存" >&nbsp;                        
                        <input name="Submit2" type="reset" class="btn_grey" value="重置">&nbsp;
                        <input name="Submit3" type="button" class="btn_grey" value="返回" onClick="JScript:history.back()">
                    </td>
                  </tr>
                </table>
			  </form>
			  </td>
            </tr>
          </table></td>
        </tr>
      </table>
      <jsp:include page="copyright.jsp"/>
    </td>
  </tr>
</table>
</td>
  </tr>
</table>
</body>
</html>
<%
}else{
	out.println("<script lanuage='javascript'>alert('您的操作有误!');window.location.href='index.jsp';</script>");
}%>

⌨️ 快捷键说明

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