Ejemplo n.º 1
0
  @RequestMapping(value = "/deleteNoteEleveByAjax", method = RequestMethod.GET)
  @ResponseBody
  public String deleteNoteEleveByAjax(
      @RequestParam(value = "idNote") long idNote,
      @RequestParam(value = "evaluation") long evaluation,
      @RequestParam(value = "inscription") long inscription,
      Model uiModel,
      HttpServletRequest httpServletRequest) {

    Notes.findNotes(idNote).remove();

    List<Notes> listeN =
        Notes.getListeNoteEleve(
                Inscription.findInscription(inscription), Evaluation.findEvaluation(evaluation))
            .getResultList();

    return Notes.toJsonArray(listeN);
  }
Ejemplo n.º 2
0
  @RequestMapping(value = "/deleteNoteClasseByAjax", method = RequestMethod.GET)
  @ResponseBody
  public String deleteNoteByAjax(Model uiModel, HttpServletRequest httpServletRequest) {

    long idNote = Long.parseLong(httpServletRequest.getParameter("idNote"));

    Notes.findNotes(idNote).remove();

    long evaluation = Long.parseLong(httpServletRequest.getParameter("evaluation"));

    long matiere = Long.parseLong(httpServletRequest.getParameter("matiere"));

    List<Notes> listeN =
        Notes.getListeNoteClasse(
                Matiere.findMatiere(matiere), Evaluation.findEvaluation(evaluation))
            .getResultList();

    return Notes.toJsonArray(listeN);
  }