Esempio n. 1
0
  @RequestMapping(method = RequestMethod.GET, params = "deleteAttendances=Y")
  public String deletCurrentAttendances(Model model, HttpServletRequest request) {
    Child child = childManager.findChild(Integer.parseInt(request.getParameter("childId")));

    model.addAttribute(
        "attendancesDeleted", attendanceManager.deleteAttendancesForCurrentTerm(child));

    return showForm(model, request);
  }
Esempio n. 2
0
  @RequestMapping(method = RequestMethod.GET)
  public String showForm(Model model, HttpServletRequest request) {
    Child child = childManager.findChild(Integer.parseInt(request.getParameter("childId")));
    child.setBills(billManager.findBillsForChild(child));
    ChildEditForm form = new ChildEditForm();
    form.setChild(child);

    model.addAttribute("formObject", form);
    model.addAttribute("rooms", roomManager.findAllActive());
    model.addAttribute("typeOfAttendances", TypeOfAttendance.values());
    model.addAttribute("ethnicityList", Ethnicity.values());
    model.addAttribute("paymentList", PaymentType.values());

    return "editChild";
  }