Ejemplo n.º 1
0
  protected void service(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    Long id = Long.parseLong(request.getParameter("cId"));
    HolidayService hs = new HolidayServiceImpl();
    //		BSBeanUtils bu = new BSBeanUtils();

    BSmySQL mysql = new BSmySQL();
    Connection conn = mysql.getConnection(request);

    Holiday holiday = hs.getHoliday(conn, id);
    Employee employee = getEmployee(conn, holiday);
    Agreement agreement = getAgreement(conn, employee);
    List<HolidayDetail> holidayDetails = hs.getHolidayDetail(conn, id);

    request.setAttribute("Agreement", agreement);
    request.setAttribute("Employee", employee);
    request.setAttribute("Holiday", holiday);
    request.setAttribute("Days", holiday.getNormal() + holiday.getCreeping());
    request.setAttribute("To", hs.getEndDate(conn, holiday));
    request.setAttribute("HolidayDetails", holidayDetails);
    mysql.closeConnection(conn);

    request
        .getRequestDispatcher("/WEB-INF/jsp/remuneration/events/holiday/certificate.jsp")
        .forward(request, response);
  }
Ejemplo n.º 2
0
 private Employee getEmployee(Connection conn, Holiday holiday) {
   EmployeeService es = new EmployeeServiceImpl();
   return es.getEmployee(conn, holiday.getEmployee());
 }