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); }
public static void delete(long id) { MJPastTraining pastTraining = MJPastTraining.findById(id); pastTraining.delete(); flash.success("deleted"); MJPastTrainings.show(pastTraining.resident.id); }
public static void showOlds(long residentID) { Person resident = Person.findById(residentID); List<MJPastTraining> pastTrainings = MJPastTraining.getOlds(resident); render(pastTrainings); }
public static void save(MJPastTraining pastTraining) { pastTraining.save(); flash.success("saved"); MJPastTrainings.show(pastTraining.resident.id); }