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

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