|
|
@@ -4,6 +4,8 @@ using CD67.FicheCollege.Factory;
|
|
|
using CD67.FicheCollege.Entity;
|
|
|
using CD67.FicheCollege.MVC.Models;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Web;
|
|
|
+using System;
|
|
|
|
|
|
namespace CD67.FicheCollege.MVC.Controllers
|
|
|
{
|
|
|
@@ -28,6 +30,11 @@ namespace CD67.FicheCollege.MVC.Controllers
|
|
|
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
|
|
}
|
|
|
|
|
|
+ HttpCookie cookie = new HttpCookie("last_selected_year");
|
|
|
+ cookie.Value = id.ToString();
|
|
|
+ cookie.Expires = DateTime.Now.AddMonths(1);
|
|
|
+ Response.SetCookie(cookie);
|
|
|
+
|
|
|
AnneeFactory anneeFactory = new AnneeFactory(db);
|
|
|
Entity.Annee annee = anneeFactory.getById(id);
|
|
|
if (annee == null)
|