public IActionResult AddSetStage(int idStage = 0, bool Duplicate = false)
 {
     if (Duplicate)
     {
         ViewBag.LeStage = repo.GetStageByID(idStage);
         ViewBag.LesRestrictionUtilise = repoRestriction.GetRestrictionIDFromStageID(idStage);
         ViewBag.LeStage.IDStage       = 0;
         idStage = 0;
     }
     if (idStage == 0)
     {
         ViewBag.PageTitle             = lang.AjouterUnStage;
         ViewBag.IconTitle             = "add_circle";
         ViewBag.IconButton            = "send";
         ViewBag.ColorButton           = "green";
         ViewBag.TextButton            = lang.Creer;
         ViewBag.LinkBack              = "../Stage/ListeStage";
         ViewBag.LesRestrictionUtilise = new List <int>();
     }
     else
     {
         ViewBag.PageTitle             = lang.ModifierUnStage;
         ViewBag.IconTitle             = "create";
         ViewBag.LeStage               = repo.GetStageByID(idStage);
         ViewBag.IconButton            = "create";
         ViewBag.ColorButton           = "orange";
         ViewBag.TextButton            = lang.Modifier;
         ViewBag.LinkBack              = "../Stage/VisionnerStage/" + idStage;
         ViewBag.LesRestrictionUtilise = repoRestriction.GetRestrictionIDFromStageID(idStage);
     }
     ViewBag.lesMilieus     = repoMilieu.GetAllMilieuStage();
     ViewBag.LesRestriction = repoRestriction.GetAllRestriction();
     return(View());
 }
        public IActionResult AjouterModifierMilieuStage(int id = 0, bool CreationCopie = false)
        {
            if (CreationCopie)
            {
                ViewBag.Milieu = repo.GetMilieuStageById(id);
                ViewBag.LesRestrictionUtilise = repoRestriction.GetRestrictionIDFromMilieuStageID(id);
                ViewBag.Milieu.IDMilieuStage  = 0;
                id = 0;
            }
            if (id == 0)
            {
                ViewBag.TitrePage     = lang.AjouterUnMilieuDeStage;
                ViewBag.IconeTitre    = "add_circle";
                ViewBag.IconeBouton   = "send";
                ViewBag.CouleurBouton = "green";
                ViewBag.TexteBouton   = lang.Creer;
                if (CreationCopie)
                {
                    ViewBag.LienRetour = "../ListeMilieuStage";
                }
                else
                {
                    ViewBag.LienRetour = "../MilieuStage/ListeMilieuStage";
                }

                ViewBag.LesRestrictionUtilise = new List <int>();
            }
            else
            {
                ViewBag.TitrePage             = lang.ModifierUnMilieuDeStage;
                ViewBag.IconeTitre            = "create";
                ViewBag.Milieu                = repo.GetMilieuStageById(id);
                ViewBag.IconeBouton           = "create";
                ViewBag.CouleurBouton         = "orange";
                ViewBag.TexteBouton           = lang.Modifier;
                ViewBag.LienRetour            = "../VisionnerMilieuStage/" + id;
                ViewBag.LesRestrictionUtilise = repoRestriction.GetRestrictionIDFromMilieuStageID(id);
            }
            ViewBag.TexteBoutonRetour = lang.Retour;
            ViewBag.LesRestriction    = repoRestriction.GetAllRestriction();
            return(View());
        }