public ActionResult CreationSondage(int?idCreateur, string question, List <string> choix, string typeChoix)
        {
            bool choix_multiple = false;

            if (typeChoix == "choix_multiple")
            {
                choix_multiple = true;
            }

            //Gestion de la saisie utilisateur
            choix.RemoveAll(element => (string.IsNullOrWhiteSpace(element))); //Parcour la liste et retire les chaines vide ou null ou les espace

            if (choix.Count() < 2)                                            // l'utilisateur doit saisir au moins deux choix de reponses
            {
                return(View("erreur_nb_reponse", idCreateur));
            }

            if (string.IsNullOrWhiteSpace((string)question)) // L'utilisateur doit saisir la question
            {
                return(View("erreur_question", idCreateur));
            }

            //On crée un ID unique que l'on rentre en DB
            string  myGuid     = Convert.ToString(Guid.NewGuid());
            Sondage newSondage = new Sondage((string)question, choix_multiple, (int)idCreateur, myGuid);

            int idSondage;

            try
            {
                idSondage = DAL.AddSondage(newSondage);
            }
            catch (Exception)
            {
                return(new HttpNotFoundResult());
            }

            //TODO : revoir la partie localhost
            newSondage.UrlPartage     = @"localhost:8870/Partage/Vote/" + Convert.ToString(idSondage);
            newSondage.UrlSuppression = @"localhost:8870/Partage/DesactiverSondage/" + Convert.ToString(myGuid);
            newSondage.UrlResultat    = @"localhost:8870/Partage/Resultat/" + Convert.ToString(idSondage);

            //On met les URL en DB
            DAL.UpdateSondage(newSondage, idSondage);

            List <Reponse> mesReponses = new List <Reponse>();

            //On enlève les inputs vide
            foreach (var c in choix)
            {
                if (!(string.IsNullOrEmpty(c)))
                {
                    mesReponses.Add(new Reponse(idSondage, c));
                }
            }

            foreach (var reponse in mesReponses)
            {
                DAL.AddReponse(reponse);
            }

            Createur monCreateur = DAL.GetCreateurById(idSondage);

            if (!string.IsNullOrWhiteSpace(monCreateur.EmailCreateur))
            {
                Methodes.EnvoiMail(newSondage, monCreateur);
            }

            return(Redirect(String.Format("/Partage/page_url/{0}", newSondage.Guid)));
        }