PresentChangeOfEmployeeData_0002ejsp_jsp.java
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:9k
源码类别:

Java编程

开发平台:

Java

  1. import javax.servlet.*;
  2. import javax.servlet.http.*;
  3. import javax.servlet.jsp.*;
  4. import org.apache.jasper.runtime.*;
  5. import java.sql.*;
  6. import humanresource.EmployeeInfoBean;
  7. public class PresentChangeOfEmployeeData_0002ejsp_jsp extends HttpJspBase {
  8.   private static java.util.Vector _jspx_includes;
  9.   static {
  10.     _jspx_includes = new java.util.Vector(2);
  11.     _jspx_includes.add("/CompanyBanner.html");
  12.     _jspx_includes.add("/SiteNavigator.html");
  13.   }
  14.   public java.util.List getIncludes() {
  15.     return _jspx_includes;
  16.   }
  17.   public void _jspService(HttpServletRequest request, HttpServletResponse response)
  18.         throws java.io.IOException, ServletException {
  19.     JspFactory _jspxFactory = null;
  20.     javax.servlet.jsp.PageContext pageContext = null;
  21.     HttpSession session = null;
  22.     ServletContext application = null;
  23.     ServletConfig config = null;
  24.     JspWriter out = null;
  25.     Object page = this;
  26.     JspWriter _jspx_out = null;
  27.     try {
  28.       _jspxFactory = JspFactory.getDefaultFactory();
  29.       response.setContentType("text/html; charset=GBK");
  30.       pageContext = _jspxFactory.getPageContext(this, request, response,
  31.        null, true, 8192, true);
  32.       application = pageContext.getServletContext();
  33.       config = pageContext.getServletConfig();
  34.       session = pageContext.getSession();
  35.       out = pageContext.getOut();
  36.       _jspx_out = out;
  37.       out.write("rn");
  38.       out.write("<HTML>rn");
  39.       out.write("<HEAD>");
  40.       out.write("<TITLE>");
  41.       out.write("</TITLE>");
  42.       out.write("</HEAD>rn");
  43.       out.write("<BODY>rn");
  44.       out.write("<TABLE WIDTH="100%" BORDER="0" BGCOLOR="navy">n  ");
  45.       out.write("<TR ALIGN="center">n    ");
  46.       out.write("<TD>");
  47.       out.write("<FONT SIZE="7" COLOR="yellow">Husky World");
  48.       out.write("</FONT>");
  49.       out.write("</TD>n  ");
  50.       out.write("</TR>n");
  51.       out.write("</TABLE>");
  52.       out.write("rn");
  53.       out.write("rn");
  54.       out.write("rnrn");
  55.       humanresource.EmployeeInfoBean empInfo = null;
  56.       synchronized (request) {
  57.         empInfo = (humanresource.EmployeeInfoBean) pageContext.getAttribute("empInfo", PageContext.REQUEST_SCOPE);
  58.         if (empInfo == null){
  59.           try {
  60.             empInfo = (humanresource.EmployeeInfoBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "humanresource.EmployeeInfoBean");
  61.           } catch (ClassNotFoundException exc) {
  62.             throw new InstantiationException(exc.getMessage());
  63.           } catch (Exception exc) {
  64.             throw new ServletException("Cannot create bean of class " + "humanresource.EmployeeInfoBean", exc);
  65.           }
  66.           pageContext.setAttribute("empInfo", empInfo, PageContext.REQUEST_SCOPE);
  67.         }
  68.       }
  69.       out.write("rn");
  70.       out.write("<CENTER>rn  ");
  71.       out.write("<FONT SIZE="5" COLOR="navy">rn    Your New Informationrn  ");
  72.       out.write("</FONT>rn");
  73.       out.write("</CENTER>rn");
  74.       out.write("<TABLE WIDTH="100%" BORDER="1">rn");
  75.    int employeeID = empInfo.getId();
  76.    try {
  77.   /* Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();
  78.    Connection conn =
  79.      DriverManager.getConnection("jdbc:cloudscape:c:\HumanResourcesDB");
  80.    Statement statement = conn.createStatement();
  81.    String sql = "SELECT * FROM EMPLOYEEINFO WHERE ID = " + employeeID;*/
  82.    EmployeeInfoBean beanObj1=new EmployeeInfoBean();
  83.    ResultSet rs = beanObj1.queryPenPolicy(employeeID);
  84.    while(rs.next()){
  85.       out.write("rn     ");
  86.       out.write("<TR>");
  87.       out.write("<TD ALIGN="right" WIDTH="50%">Name:");
  88.       out.write("</TD>rn         ");
  89.       out.write("<TD WIDTH="50%">");
  90.       out.print( rs.getString("NAME") );
  91.       out.write("</TD>rn     ");
  92.       out.write("</TR>rn     ");
  93.       out.write("<TR>");
  94.       out.write("<TD ALIGN="right" WIDTH="50%">Address:");
  95.       out.write("</TD>rn         ");
  96.       out.write("<TD WIDTH="50%">");
  97.       out.print( rs.getString("ADDRESS") );
  98.       out.write("</TD>rn     ");
  99.       out.write("</TR>rn     ");
  100.       out.write("<TR>");
  101.       out.write("<TD ALIGN="right" WIDTH="50%">Phone Number:");
  102.       out.write("</TD>rn         ");
  103.       out.write("<TD WIDTH="50%">");
  104.       out.print( rs.getString("PHONE") );
  105.       out.write("</TD>rn     ");
  106.       out.write("</TR>rn     ");
  107.       out.write("<TR>");
  108.       out.write("<TD ALIGN="right" WIDTH="50%">Work Status:");
  109.       out.write("</TD>rn         ");
  110.       out.write("<TD WIDTH="50%">");
  111.       out.print( rs.getString("WORKSTATUS") );
  112.       out.write("</TD>rn     ");
  113.       out.write("</TR>rn     ");
  114.       out.write("<TR>");
  115.       out.write("<TD ALIGN="right" WIDTH="50%">Total Sick Days:");
  116.       out.write("</TD>rn         ");
  117.       out.write("<TD> ");
  118.       out.print( rs.getString("TOTALSICKDAYS") );
  119.       out.write("</TD>rn     ");
  120.       out.write("</TR>rn     ");
  121.       out.write("<TR>");
  122.       out.write("<TD ALIGN="right" WIDTH="50%">Taken Sick Days: ");
  123.       out.write("</TD>rn         ");
  124.       out.write("<TD>");
  125.       out.print( rs.getString("TAKENSICKDAYS") );
  126.       out.write("</TD>rn     ");
  127.       out.write("</TR>rn     ");
  128.       out.write("<TR>");
  129.       out.write("<TD ALIGN="right" WIDTH="50%">Total Personal Time(in hours): ");
  130.       out.write("</TD>rn         ");
  131.       out.write("<TD>");
  132.       out.print( rs.getString("TOTALPERSONALTIME") );
  133.       out.write("</TD>rn     ");
  134.       out.write("</TR>rn     ");
  135.       out.write("<TR>");
  136.       out.write("<TD ALIGN="right" WIDTH="50%">Taken Personal Time(in hours): ");
  137.       out.write("</TD>rn         ");
  138.       out.write("<TD>");
  139.       out.print( rs.getString("TAKENPERSONALTIME") );
  140.       out.write("</TD>rn     ");
  141.       out.write("</TR>rn     ");
  142.       out.write("<TR>");
  143.       out.write("<TD ALIGN="right" WIDTH="50%">Health Care Plan:");
  144.       out.write("</TD>rn         ");
  145.       out.write("<TD WIDTH="50%">");
  146.       out.print( rs.getString("HEALTHCAREPLAN") );
  147.       out.write("</TD>rn     ");
  148.       out.write("</TR>rn     ");
  149.       out.write("<TR>");
  150.       out.write("<TD ALIGN="right" WIDTH="50%">Dental Plan:");
  151.       out.write("</TD>rn         ");
  152.       out.write("<TD WIDTH="50%">");
  153.       out.print( rs.getString("DENTALPLAN") );
  154.       out.write("</TD>rn     ");
  155.       out.write("</TR>rn     ");
  156.       out.write("<TR>");
  157.       out.write("<TD ALIGN="right" WIDTH="50%">Vision Plan:");
  158.       out.write("</TD>rn         ");
  159.       out.write("<TD WIDTH="50%">");
  160.       out.print( rs.getString("VISIONPLAN") );
  161.       out.write("</TD>rn     ");
  162.       out.write("</TR>rn");
  163.  }//end while loop
  164.   } // end try block
  165.   catch (Exception e) {};
  166.       out.write("rn");
  167.       out.write("</TABLE>rn");
  168.       out.write("<BODY ALINK="yellow" VLINK="yellow" LINK="yellow">n");
  169.       out.write("<TABLE WIDTH="100%" BORDER="0" BGCOLOR="navy">n  ");
  170.       out.write("<TR ALIGN="center">n    ");
  171.       out.write("<TD COLSPAN=2>");
  172.       out.write("<FONT SIZE="4" COLOR="yellow">Site Navigator");
  173.       out.write("</FONT>");
  174.       out.write("</TD>n  ");
  175.       out.write("</TR>n  ");
  176.       out.write("<TR ALIGN="center">n    ");
  177.       out.write("<TD>");
  178.       out.write("<A HREF="PresentCompanyPolicies.jsp">n         Look at Company Policies");
  179.       out.write("</A>n    ");
  180.       out.write("</TD>n    ");
  181.       out.write("<TD>");
  182.       out.write("<A HREF="PersonalInfo.html">n         Look At Personal Information");
  183.       out.write("</A>n    ");
  184.       out.write("</TD>n  ");
  185.       out.write("</TR>n  ");
  186.       out.write("<TR ALIGN="center">n    ");
  187.       out.write("<TD>");
  188.       out.write("<A HREF="InputEmployeeInfo.html">n        Change Employee Information");
  189.       out.write("</A>");
  190.       out.write("</FONT>n    ");
  191.       out.write("</TD>n    ");
  192.       out.write("<TD>");
  193.       out.write("<A HREF="PresentCompanyHealthCareInfo.jsp">n        Look At Health Care Options");
  194.       out.write("</A>n    ");
  195.       out.write("</TD>n  ");
  196.       out.write("</TR>n  ");
  197.       out.write("<TR ALIGN="center">n    ");
  198.       out.write("<TD COLSPAN="2">");
  199.       out.write("<A HREF="HumanResources.html">n                    Home Page");
  200.       out.write("</A>n    ");
  201.       out.write("</TD>n  ");
  202.       out.write("</TR>n");
  203.       out.write("</TABLE>n");
  204.       out.write("</BODY>");
  205.       out.write("rn");
  206.       out.write("</BODY>rn");
  207.       out.write("</HTML>");
  208.     } catch (Throwable t) {
  209.       out = _jspx_out;
  210.       if (out != null && out.getBufferSize() != 0)
  211.         out.clearBuffer();
  212.       if (pageContext != null) pageContext.handlePageException(t);
  213.     } finally {
  214.       if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  215.     }
  216.   }
  217. }