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

Java编程

开发平台:

Java

  1. package org.apache.jsp;
  2. import javax.servlet.*;
  3. import javax.servlet.http.*;
  4. import javax.servlet.jsp.*;
  5. import org.apache.jasper.runtime.*;
  6. import java.sql.*;
  7. import humanresource.EmployeeInfoBean;
  8. public class PresentTimeOffData_jsp extends HttpJspBase {
  9.  int employeeID; 
  10.   private static java.util.Vector _jspx_includes;
  11.   public java.util.List getIncludes() {
  12.     return _jspx_includes;
  13.   }
  14.   public void _jspService(HttpServletRequest request, HttpServletResponse response)
  15.         throws java.io.IOException, ServletException {
  16.     JspFactory _jspxFactory = null;
  17.     javax.servlet.jsp.PageContext pageContext = null;
  18.     HttpSession session = null;
  19.     ServletContext application = null;
  20.     ServletConfig config = null;
  21.     JspWriter out = null;
  22.     Object page = this;
  23.     JspWriter _jspx_out = null;
  24.     try {
  25.       _jspxFactory = JspFactory.getDefaultFactory();
  26.       response.setContentType("text/html; charset=GBK");
  27.       pageContext = _jspxFactory.getPageContext(this, request, response,
  28.        null, true, 8192, true);
  29.       application = pageContext.getServletContext();
  30.       config = pageContext.getServletConfig();
  31.       session = pageContext.getSession();
  32.       out = pageContext.getOut();
  33.       _jspx_out = out;
  34.       out.write("rn");
  35.       out.write("<HTML>rn");
  36.       out.write("<HEAD>");
  37.       out.write("<TITLE>Your Time Off Data");
  38.       out.write("</TITLE>");
  39.       out.write("</HEAD>rn");
  40.       out.write("<BODY>rnrn");
  41.       out.write("rn");
  42.       out.write("rnrn");
  43.       out.write("rnrn");
  44.       out.write("<H1 ALIGN="center">Your Current Time Off Status");
  45.       out.write("</H1>rnrn");
  46.       out.write("<TABLE WIDTH="100%" BORDER="1">rn");
  47.    /*employeeID = Integer.valueOf(request.getParameter("id")).intValue();
  48.    Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();
  49.    Connection conn =
  50.      DriverManager.getConnection("jdbc:cloudscape:c:\HumanResourcesDB");
  51.    Statement statement = conn.createStatement();
  52.    String sql = "SELECT * FROM EMPLOYEEINFO WHERE ID = " + employeeID;
  53.    ResultSet rs = statement.executeQuery(sql);*/
  54.   EmployeeInfoBean beanObj2=new EmployeeInfoBean();
  55.   employeeID = Integer.valueOf(request.getParameter("id")).intValue();
  56.   ResultSet rs=beanObj2.queryPenPolicy(employeeID);
  57.    rs.next();
  58.       out.write("rn  ");
  59.       out.write("<TR>");
  60.       out.write("<TD ALIGN="right" WIDTH="50%">Employee Name:");
  61.       out.write("</TD>rn      ");
  62.       out.write("<TD WIDTH="50%">");
  63.       out.print( rs.getString("NAME") );
  64.       out.write("</TD>rn  ");
  65.       out.write("</TR>rn  ");
  66.       out.write("<TR>");
  67.       out.write("<TD ALIGN="right">Total Sick Days:");
  68.       out.write("</TD>rn      ");
  69.       out.write("<TD> ");
  70.       out.print( rs.getString("TOTALSICKDAYS") );
  71.       out.write("</TD>rn  ");
  72.       out.write("</TR>rn  ");
  73.       out.write("<TR>");
  74.       out.write("<TD ALIGN="right">Taken Sick Days: ");
  75.       out.write("</TD>rn      ");
  76.       out.write("<TD>");
  77.       out.print( rs.getString("TAKENSICKDAYS") );
  78.       out.write("</TD>rn  ");
  79.       out.write("</TR>rn  ");
  80.       out.write("<TR>");
  81.       out.write("<TD ALIGN="right">Total Personal Time (in hours): ");
  82.       out.write("</TD>rn      ");
  83.       out.write("<TD>");
  84.       out.print( rs.getString("TOTALPERSONALTIME") );
  85.       out.write("</TD>rn  ");
  86.       out.write("</TR>rn  ");
  87.       out.write("<TR>");
  88.       out.write("<TD ALIGN="right">Taken Personal Time (in hours): ");
  89.       out.write("</TD>rn      ");
  90.       out.write("<TD>");
  91.       out.print( rs.getString("TAKENPERSONALTIME") );
  92.       out.write("</TD>rn  ");
  93.       out.write("</TR>rn");
  94.       out.write("</TABLE>rn");
  95.       out.write("<BR>rn");
  96.       out.write("</BODY>rn");
  97.       out.write("</HTML>");
  98.     } catch (Throwable t) {
  99.       out = _jspx_out;
  100.       if (out != null && out.getBufferSize() != 0)
  101.         out.clearBuffer();
  102.       if (pageContext != null) pageContext.handlePageException(t);
  103.     } finally {
  104.       if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
  105.     }
  106.   }
  107. }