示例#1
0
  public static void show(long residentID) {
    Person p = Person.findById(residentID);
    MJPastTraining pastTraining = MJPastTraining.getLastActif(p);
    long nbOlds = MJPastTraining.nbOlds(p);

    render(p, pastTraining, nbOlds);
  }
示例#2
0
  public static void delete(long id) {
    MJPastTraining pastTraining = MJPastTraining.findById(id);
    pastTraining.delete();

    flash.success("deleted");

    MJPastTrainings.show(pastTraining.resident.id);
  }
示例#3
0
  public static void showOlds(long residentID) {
    Person resident = Person.findById(residentID);
    List<MJPastTraining> pastTrainings = MJPastTraining.getOlds(resident);

    render(pastTrainings);
  }
示例#4
0
  public static void save(MJPastTraining pastTraining) {
    pastTraining.save();
    flash.success("saved");

    MJPastTrainings.show(pastTraining.resident.id);
  }