|
|
@@ -86,7 +86,19 @@ namespace CD67.FicheCollege.MVC.Controllers
|
|
|
public JsonResult GetList()
|
|
|
{
|
|
|
AnneeFactory fact = new AnneeFactory(db);
|
|
|
- JsonResult res = Json(fact.getFlatList());
|
|
|
+
|
|
|
+ List<Annee> annees = new List<Annee>();
|
|
|
+ int max_id = 0;
|
|
|
+
|
|
|
+ foreach (Annee annee in fact.getManyBy(a => a.Colleges.Count > 0))
|
|
|
+ {
|
|
|
+ annees.Add(annee.flat());
|
|
|
+ if (annee.Id > max_id) { max_id = annee.Id; }
|
|
|
+ }
|
|
|
+ annees.Add(fact.getById(max_id + 1).flat());
|
|
|
+ annees.Add(fact.getById(max_id + 2).flat());
|
|
|
+
|
|
|
+ JsonResult res = Json(annees);
|
|
|
res.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
|
|
|
return res;
|
|
|
}
|