// GET: ListeVolsDepart public ActionResult ListeVolsDepart(string cible) { if (cible == null || cible == "Aujourd'hui") { ViewBag.VolsDeparts = VolDAO.listeVolsDepartsAujourd().ToList(); } else if (cible == "Demain") { ViewBag.VolsDeparts = VolDAO.listeVolsDepartsDemain().ToList(); } return(View()); }
// GET: Vols public ActionResult Index(string cible) { List <VolPlannifie> listeVols = new List <VolPlannifie>(); DateTime demain = DateTime.Now.AddDays(1); DateTime aujourdhui = DateTime.Now.AddHours(16); if (cible == null || cible == "Aujourd'hui") { ViewBag.VolsDeparts = VolDAO.listeVolsDepartsAujourd().ToList(); ViewBag.VolsArrives = VolDAO.listeVolsArrivesAujourd().ToList(); } else if (cible == "Demain") { ViewBag.VolsDeparts = VolDAO.listeVolsDepartsDemain().ToList(); ViewBag.VolsArrives = VolDAO.listeVolsArrivesDemain().ToList(); } return(View()); }