コード例 #1
0
  /**
   * Searching lab outsourced
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return
   * @throws Exception
   */
  @SuppressWarnings("all")
  public ActionForward searchForLabOutsource(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    new TransactionContext((UserDetails) request.getSession(false).getAttribute("userDetails"));
    AshaLogger.logInfo(logger, this.getClass().getName(), "search", "Executing");
    String startDate1 = "0000-00-00";
    String endDate1 = "0000-00-00";
    AmountDueDao dueDao = new AmountDueDao();

    String startDate = request.getParameter("from_date");
    String endDate = request.getParameter("to_date");
    startDate = dueDao.formatDate(startDate);
    endDate = dueDao.formatDate(endDate);

    request.setAttribute("hidden_startDate", startDate);
    request.setAttribute("hidden_endDate", endDate);

    String status = "";
    status = dueDao.getLabOutsourcedDetails(startDate, endDate, request);
    status = "searchLabOutsource";
    ActionForward actionForward = mapping.findForward(status);
    return actionForward;
  }
コード例 #2
0
  /**
   * Getting lab outsource details
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return
   * @throws Exception
   */
  public ActionForward getLabOutsourced(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    new TransactionContext((UserDetails) request.getSession(false).getAttribute("userDetails"));
    AshaLogger.logInfo(logger, this.getClass().getName(), "getLabOutsourced", "Executing");
    String startDate1 = "0000-00-00";
    String endDate1 = "0000-00-00";
    AmountDueDao dueDao = new AmountDueDao();

    Date date = new Date();
    Format formatter = new SimpleDateFormat("dd-MMM-yyyy");
    String startDate = formatter.format(date);
    String endDate = formatter.format(date);

    request.setAttribute("startDate", startDate.toUpperCase());
    request.setAttribute("endDate", endDate.toUpperCase());

    startDate = dueDao.formatDate(startDate);
    endDate = dueDao.formatDate(endDate);

    request.setAttribute("hidden_startDate", startDate);
    request.setAttribute("hidden_endDate", endDate);

    String status = "";
    status = dueDao.getLabOutsourcedDetails(startDate, endDate, request);
    ActionForward actionForward = mapping.findForward(status);
    return actionForward;
  }