public ActionResult Index() { ViewBag.Current = "Home"; if (UserValide.IsValid() && UserValide.IsStudent()) { return(View()); } else { return(RedirectToAction("Authentification1", "User")); } }
//pour Imprimer le pdf public ActionResult PrintConsultation() { Etudiant etudiants = etudiantContext.etudiants.Find(Session["userId"]); var q = new ViewAsPdf("RecuEtudiant", etudiants); if (UserValide.IsValid() && UserValide.IsStudent()) { return(q); } else { return(RedirectToAction("Authentification1", "User")); } }
//**************************************************************************************************************************** public ActionResult Consulter() { ViewBag.Current = "Consulter"; if (UserValide.IsValid() && UserValide.IsStudent()) { Etudiant etudiants = etudiantContext.etudiants.Find(Session["userId"]); return(View(etudiants)); } else { return(RedirectToAction("Authentification1", "User")); } }
//-------------------------------------------------------------------------------------------------------------------------- //Modification public ActionResult Modification() { ViewBag.Current = "Modification"; ViewBag.check = "Checked"; /* if (id == null) * { * return new HttpStatusCodeResult(HttpStatusCode.BadRequest); * }*/ if (UserValide.IsValid() && UserValide.IsStudent()) { Etudiant etudiants = etudiantContext.etudiants.Find(Session["userId"]); return(View(etudiants)); } else { return(RedirectToAction("Authentification1", "User")); } }