Exemplo n.º 1
0
  @RequestMapping(value = "/checkout.html", method = RequestMethod.POST)
  public ModelAndView checkOut(Model model, @RequestParam String selectedPatient)
      throws SQLException {

    setAppContext();

    clinicService.deletePatient(selectedPatient);

    List<Patient> patients = clinicService.getAllpatients();
    model.addAttribute("patients", patients);

    ModelAndView checkout = new ModelAndView("CheckOut");
    return checkout;
  }
Exemplo n.º 2
0
  @RequestMapping(value = "/checkout.html", method = RequestMethod.GET)
  public ModelAndView infoPatient(Model model) throws SQLException {

    setAppContext();

    List<Patient> patients = clinicService.getAllpatients();
    model.addAttribute("patients", patients);

    ModelAndView checkout = new ModelAndView("CheckOut");
    return checkout;
  }