public ActionResult Index(int? pCongresID)
        {
            ViewBag.TypeSpectacleId = new SelectList(db.TypeSpectacles, "Id", "Nom");

            if (pCongresID == null)
            {
                //Obtenir l'utilisateur connecte.
                string userID = User.Identity.GetUserId();
                if (userID != null)
                {
                    ViewBag.User = db.Users.Find(userID);
                }

                SpectacleVM spectacleVM = new SpectacleVM(db.Spectacles.ToList());
                return View(spectacleVM);
            }
            else
            {
                ViewBag.CongresId = pCongresID;

                //Obtenir l'utilisateur connecte.
                string userID = User.Identity.GetUserId();
                if (userID != null)
                {
                    ViewBag.User = db.Users.Find(userID);
                }

                SpectacleVM spectacleVM = new SpectacleVM(db.Spectacles.Where(s => s.Congres.Id == pCongresID).ToList());
                return View(spectacleVM);
            }
        }
        public ActionResult Index(FormCollection data, int? pCongresID)
        {
            if (pCongresID == null)
            {
                //DropDownList TypeSpectacle.
                int typeSpectacleID = int.Parse(data["TypeSpectacleId"].ToString());
                ViewBag.TypeSpectacleId = new SelectList(db.TypeSpectacles, "Id", "Nom", typeSpectacleID);

                //Filtrage des spectacles (TypeSpectacle).
                var spectaclesFiltres = db.Spectacles.Where(s => s.TypeSpectacle.Id == typeSpectacleID);

                //Obtenir l'utilisateur connecte.
                string userID = User.Identity.GetUserId();
                if (userID != null)
                {
                    ViewBag.User = db.Users.Find(userID);
                }

                SpectacleVM spectacleVM = new SpectacleVM(spectaclesFiltres.ToList());
                return View(spectacleVM);
            }
            else
            {
                //DropDownList TypeSpectacle.
                int typeSpectacleID = int.Parse(data["TypeSpectacleId"].ToString());
                ViewBag.TypeSpectacleId = new SelectList(db.TypeSpectacles, "Id", "Nom", typeSpectacleID);

                //Filtrage des spectacles (TypeSpectacle, congresID).
                var spectaclesFiltres = db.Spectacles.Where(s => s.Congres.Id == pCongresID && s.TypeSpectacle.Id == typeSpectacleID);
                ViewBag.CongresId = pCongresID;

                //Obtenir l'utilisateur connecte.
                string userID = User.Identity.GetUserId();
                if (userID != null)
                {
                    ViewBag.User = db.Users.Find(userID);
                }

                SpectacleVM spectacleVM = new SpectacleVM(spectaclesFiltres.ToList());
                return View(spectacleVM);
            }
        }
        public ActionResult Details(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            Spectacle spectacle = db.Spectacles.Find(id);
            if (spectacle == null)
            {
                return HttpNotFound();
            }

            //Obtenir l'utilisateur connecte.
            string userID = User.Identity.GetUserId();
            if (userID != null)
            {
                ViewBag.User = db.Users.Find(userID);
            }

            SpectacleVM spectacleVM = new SpectacleVM(spectacle);
            return View(spectacleVM);
        }