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

📄 clientsearchinfo.jsp

📁 这是一个法律事务所系统源码
💻 JSP
字号:
<%--
模块名称:客户管理
模块功能:客户查询信息
版    本:V1.0
著 作 人:蔡静
著作日期:2001-10-08
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:
        = = = = = = = = = = = = = = = = = = = = = = = = = =
	修改日期:
	修 改 人:
	修改理由:
	修改出处:
	= = = = = = = = = = = = = = = = = = = = = = = = = =

--%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<%
  String customer_id, customer_name, customer_type, lawyer_id, case_id;
  String case_reason, enter_date1, enter_date2;
  customer_id = request.getParameter("customer_id");
  customer_name = request.getParameter("customer_name");
  customer_type = request.getParameter("customer_type");
  lawyer_id = request.getParameter("lawyer_id");
  case_id = request.getParameter("case_id");
  case_reason = request.getParameter("case_reason");
  enter_date1 = request.getParameter("enter_date1");
  enter_date2 = request.getParameter("enter_date2");
  String condition = "";
  if ((customer_id != null) && (!customer_id.equals(""))) {
    condition = condition + " and customer_id='" + customer_id + "'";
  }
  if ((customer_name != null) && (!customer_name.equals(""))) {
    condition = condition + " and customer_name like '%" + customer_name + "%'";
  }
  if (!customer_type.equals("all")) {
    condition = condition + " and customer_type='" + customer_type + "'";
  }
  if ((lawyer_id != null) && (!lawyer_id.equals(""))) {
    condition = condition + " and lawyer_id='" + lawyer_id + "'";
  }
  if ((case_id != null) && (!case_id.equals(""))) {
    condition = condition + " and customer_id in (select customer_id from t_caseinfo";
    condition = condition + " where case_id like '" + case_id + "')";
  }
  if ((case_reason != null) && (!case_reason.equals(""))) {
    condition = condition + " and customer_id in (select customer_id from t_caseinfo";
    condition = condition + " where case_reason like '%" + case_reason + "%')";
  }
  if ((enter_date1 != null) && (!enter_date1.equals(""))) {
    condition = condition + " and enter_date >= '" + enter_date1 + "'";
  }
  if ((enter_date2 != null) && (!enter_date2.equals(""))) {
    condition = condition + " and enter_date <= '" + enter_date2 + "'";
  }
  String sql = "select customer_id, customer_name from t_customer where 1=1";
  sql = sql + condition + " order by customer_id";
  ResultSet rs = db.executeQuery(sql);
%>
<html>
<head>
<title>客户信息</title>
<%@ include file="../inc/config.jsp" %>
</head>

<body class=page>
<script language="javascript">
   function selectID() {
     var a = document.all.item("rel");
     var customer_ids = "";
     var flag=0;
     if (a!=null)
       if (a.length!=null)
	 for (i=0; i<a.length; i++)  {
	   if(a(i).checked) {
             if (customer_ids == "")
               customer_ids = a(i).value;
             else
               customer_ids = customer_ids + "," + a(i).value;
             flag=1;
           }
	 }
	 else
	 {
	   if(a.checked) {
	     customer_ids = a.value;
	     flag=1;
	   }
         }
       if (!flag)
       {
         alert("请选择一项!")
         return false;
       }
      if(!window.confirm("确定要删除选中的项目吗?"))
      {
        return false;
      }
      else {
        document.thisForm.customer_ids.value=customer_ids;
        document.thisForm.submit();
        return true;
      }
   }
</script>
<!--显示工具条-->
<table width="98%" align="center" cellspacing="0" cellpadding="0" border="0">
  <tr>
    <td><a href="Client.jsp"><img src="../images/all.gif" height="22" border="0" width="88"></a>
    <a href="ClientAdd.jsp"><img src="../images/add.gif" alt="增加内容" width="79" height="22" border="0"  ></a>
    <img src="../images/delete.gif" alt="删除选中的内容" onClick="return selectID();" style="cursor:hand" width="79" height="22">
    <a href="ClientSearch.jsp"><img src="../images/query.gif" alt="查询内容"   width="79" height="22" border="0"></a></td>
    <td width="108" height="30" align="center" background="../images/title_bg.gif">
      <script language=JavaScript>
document.write("<span class=\"title\">"+document.title+"</span>");
</script>
    </td>
  </tr>
</table>
<table width="98%" background="../images/line.gif" border="0" cellspacing="0" cellpadding="0" height="12" align="center">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<!--显示工具条结束-->
  <form name="thisForm" METHOD="post" action="ClientDel.jsp">
  <table width="98%" cellspacing="1" cellpadding="0"  height="25" align="center" border="0" class="table_bg">
      <tr class="title_bg">
      <td height="25" width="9%" align="center">
        <input  name="chkCheckAll" type="checkbox" enabled onclick="CheckAll();">
      </td>
      <td width="12%" align="center"> 客户编号</td>
      <td width="68%" align="center"> 客户名称</td>
      <td width="11%" align="center"> 操作</td>
    </tr>
  <%
    while (rs.next()) {
      customer_id = rs.getString("customer_id");
      customer_name = rs.getString("customer_name");
      if (rs.getRow()!=(rs.getRow()/2*2)) {
  %>
  <tr  class="tr_bg1">
  <%  }
      else {
  %>
  <tr  class="tr_bg2">
  <%  }
  %>
      <td height="25" width="9%" align="center">
        <input name="rel" type="checkbox" enabled value='<%=customer_id%>'>
      </td>
      <td width="12%" align="right"><%=customer_id%></td>
      <td width="68%" align="right">
      <a href="ClientInfo.jsp?customer_id=<%=customer_id%>"><%=customer_name%></a></td>
      <td width="11%" align="center">
      <a href="ClientAmend.jsp?customer_id=<%=customer_id%>"><img src="../images/edit.gif" width="18" height="13" border="0" alt="修改" ></a></td>
    </tr>
  <%
    }
  %>
  </table>
  </form>
</body>
</html>

⌨️ 快捷键说明

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