| 1234567891011121314151617181920212223242526272829303132 |
- using System.Web.Mvc;
- using System.Net;
- using CD67.FicheCollege.Factory;
- using CD67.FicheCollege.Entity;
- using CD67.FicheCollege.MVC.Models;
- namespace CD67.FicheCollege.MVC.Controllers
- {
- public class AnneesController : Controller
- {
- private Entities db = new Entities();
- // GET: Home
- public ActionResult Details(int? id)
- {
- if (id == null)
- {
- return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
- }
- AnneeFactory anneeFactory = new AnneeFactory(db);
- Entity.Annee annee = anneeFactory.getById(id);
- if (annee == null)
- {
- return HttpNotFound();
- }
- AnneeViewModel model = new AnneeViewModel(annee);
- return View(model);
- }
- }
- }
|