Address_View.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:11k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.commoninfo.addresslist.value.*"%>
- <%@ page import="com.vnex.intranet.commoninfo.addresslist.proxy.*"%>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="java.util.*" %>
- <%@ page import="java.sql.*" %>
- <jsp:useBean id="addressListProxy" class="com.vnex.intranet.commoninfo.addresslist.proxy.AddressListProxyBean" scope="application" />
- <%
- int companyId = 0;
- if(request.getParameter("companyId")!=null && !request.getParameter("companyId").equals(""))
- companyId = Integer.parseInt(request.getParameter("companyId"));
- String con = "";
- String sDepartment = "";
- String sEmployeName = "";
- CommonDBOperation cdb = new CommonDBOperation();
- String DBProductName = cdb.getDBProduct();
- if(DBProductName.startsWith("Oracle"))
- {
- if(request.getParameter("sDepartment")!=null && !request.getParameter("sDepartment").equals(""))
- {
- sDepartment = request.getParameter("sDepartment");
- con = " and employe_department='"+sDepartment+"'";
- }
- if(request.getParameter("sEmployeName")!=null && !request.getParameter("sEmployeName").equals(""))
- {
- sEmployeName = request.getParameter("sEmployeName");
- con = con + " and employe_name like '%"+sEmployeName+"%'";
- }
- }
- else if(DBProductName.startsWith("Microsoft SQL Server"))
- {
- if(request.getParameter("sDepartment")!=null && !request.getParameter("sDepartment").equals(""))
- {
- sDepartment = request.getParameter("sDepartment");
- con = " and employe_department='"+cdb.changeCode(sDepartment)+"'";
- }
- if(request.getParameter("sEmployeName")!=null && !request.getParameter("sEmployeName").equals(""))
- {
- sEmployeName = request.getParameter("sEmployeName");
- con = con + " and employe_name like '%"+cdb.changeCode(sEmployeName)+"%'";
- }
- }
- AddressListValueBean companyBeanD = new AddressListValueBean();
- AddressListValueBean companyBean = new AddressListValueBean();
- companyBeanD = addressListProxy.getAddressListDetail(companyId);
- companyBean = addressListProxy.getAddressListDetail(companyId, con);
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language=JavaScript>
- function isValidChar(str)
- {
- var i,j,strTemp;
- strTemp=""'<>/\";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function searchEmploye()
- {
- if(!isValidChar(myform.sEmployeName.value))
- {
- alert("查询职员姓名不能包括 " ' < > / \ 这些特殊字符。");
- myform.sEmployeName.focus();
- return false;
- }
- myform.action= "/mainctrl/commoninfo/addresslist/detailAddressListClient";
- myform.submit();
- }
- </script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_public.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <DIV align=center>
- <form name="myform" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center">
- <br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr>
- <td>
- <table width="600" border="0" cellspacing="0" cellpadding="2">
- <tr bgcolor="#666666">
- <td height="15"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/public/main"><font color="#FFFFFF">公用信息</font></a>>><a href="/mainctrl/commoninfo/addresslist/getAddressListClient"><font color="#FFFFFF">外部通讯录</font></a>>>显示通讯录详细信息</font></td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="1" width="600" class=title>
- <tr bgcolor="#e0e0e0">
- <td width="17%"><font class="strong"> 公司名称:</font></td>
- <td width="83%" colspan="5"><%= companyBean.getCompanyName()%></td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="17%"><font class="strong"> 地址:</font></td>
- <td width="83%" colspan="5"><%= companyBean.getCompanyAddress()%></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="17%"><font class="strong"> 邮编:</font></td>
- <td width="16%">
- <% if(companyBean.getCompanyZip()!=0) out.println(companyBean.getCompanyZip()); %>
- </td>
- <td width="17%"><font class="strong"> 电话:</font></td>
- <td width="16%"><%= companyBean.getCompanyTelephone()%></td>
- <td width="17%"><font class="strong"> 传真:</font></td>
- <td width="16%"><%= companyBean.getCompanyFax()%></td>
- </tr>
- </table>
- <table width="600" border="0" cellspacing="0" cellpadding="2">
- <tr bgcolor="#fafafa">
- <td height="30" colspan="9"> <font class="strong">选择部门:</font>
- <select name="sDepartment" style="width=100">
- <option value="">全部</option>
- <%
- Collection col = companyBeanD.getEmployes();
- AddressEmployeValueBean evb = null;
- Vector vec = new Vector();
- if(col != null && col.size() != 0)
- {
- Iterator it = col.iterator();
- while( it.hasNext() )
- {
- evb = (AddressEmployeValueBean)it.next();
- if( !vec.contains(evb.getEmployeDepartment()) )
- {
- vec.add(evb.getEmployeDepartment());
- }
- }
- }
- for(int i=0; i<vec.size(); i++)
- {
- if( vec.get(i)!=null )
- {
- if(sDepartment.equals( (String)vec.get(i) ))
- {
- out.println("<option value=""+FieldUtil.filterQuotTag((String)vec.get(i))+"" selected>" + (String)vec.get(i) + "</option>");
- }
- else
- {
- out.println("<option value=""+FieldUtil.filterQuotTag((String)vec.get(i))+"">" + (String)vec.get(i) + "</option>");
- }
- }
- }
- %>
- </select>
- <font class="strong">职员姓名:</font>
- <input type="text" name="sEmployeName" class="file" value="<%= sEmployeName%>">
-
- <input type="button" name="Button2" value="查询" class="text" onClick="return searchEmploye()">
- </td>
- </tr>
- </table>
- <table width="600" border="0" cellpadding="2" cellspacing="1" class=title>
- <tr align="center">
- <td><font class="strong">姓名</font></td>
- <td><font class="strong">部门</font></td>
- <td><font class="strong">职务</font></td>
- <td><font class="strong">分机</font></td>
- <td><font class="strong">呼机</font></td>
- <td><font class="strong">手机</font></td>
- <td><font class="strong">办公室</font></td>
- <td><font class="strong">Email</font></td>
- </tr>
- <%
- Collection coll = companyBean.getEmployes();
- AddressEmployeValueBean aevb = null;
- int start = 1;
- if ( request.getParameter("start") !=null )
- {
- start = Integer.parseInt( request.getParameter("start") );
- }
- int rowPerPage = com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
- int size = coll.size();
- String action = "/mainctrl/commoninfo/addresslist/detailAddressListClient?companyId=" + companyId;
- if(!sDepartment.equals(""))
- {
- action += "&sDepartment=" + sDepartment;
- }
- if(!sEmployeName.equals(""))
- {
- action += "&sEmployeName=" + sEmployeName;
- }
- String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
- int i = 0;
- if(coll != null && coll.size() != 0)
- {
- Iterator it = coll.iterator();
- int flag = 0;
- String bgcolor = null;
- while( it.hasNext() && i < size && i < ( start+rowPerPage-1) )
- {
- i++;
- aevb = (AddressEmployeValueBean)it.next();
- if ( i < start ) continue;
- if( flag%2==0 )
- {
- bgcolor = "#e0e0e0";
- }
- else
- {
- bgcolor = "#fafafa";
- }
- %>
- <tr bgcolor="<%= bgcolor%>" align="center">
- <td><%= aevb.getEmployeName()%></td>
- <td><%= aevb.getEmployeDepartment()%></td>
- <td><%= aevb.getEmployeDuty()%></td>
- <td>
- <% if(aevb.getEmployeExtension()!=0) out.println(aevb.getEmployeExtension()); %>
- </td>
- <td><%= aevb.getEmployePager()%></td>
- <td><%= aevb.getEmployeHandset()%></td>
- <td><%= aevb.getEmployeOffice()%></td>
- <td><a href="mailto:<%= aevb.getEmployeEmail()%>"><%= aevb.getEmployeEmail()%></a></td>
- </tr>
- <%
- flag++;
- }
- }
- if(request.getParameter("sstart")!=null)
- {
- session.setAttribute("start", request.getParameter("sstart"));
- }
- %>
- <input type="hidden" name="companyId" value="<%= companyId%>">
- <tr>
- <td bgcolor="#e0e0e0" colspan="8"> <%= nav %> </td>
- </tr>
- <tr bgcolor="#fafafa" align="center">
- <td colspan="8" height="30">
- <input type="button" value="返回" name="B1" onClick="location='/mainctrl/commoninfo/addresslist/getAddressListClient?start=<%= (String)session.getAttribute("start")%>'" class="text">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <br>
- <br>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>