public IActionResult ViewRestriction(int id) { if (id == 0) { ViewBag.PageTitle = lang.AjouterRestriction; ViewBag.IconTitle = "add_circle"; ViewBag.IconButton = "send"; ViewBag.ColorButton = "green"; ViewBag.TextButton = lang.Creer; ViewBag.LinkBack = "../Restriction/ListeRestriction"; } else { ViewBag.PageTitle = lang.ModifierRestriction; ViewBag.IconTitle = "create"; ViewBag.Restriction = repo.GetRestrictionByID(id); ViewBag.IconButton = "create"; ViewBag.ColorButton = "orange"; ViewBag.TextButton = lang.Modifier; ViewBag.LinkBack = "../ListeRestriction"; } return(View()); }