public ActionResult ModifierCateg(Categorie c) { if (ModelState.IsValid) { CategoriesRequette.Update(c); return(RedirectToAction("Index", "Home")); } return(View()); }
public ActionResult DeleteCateg() { //LangueController.CreateCulture(getLangue()); CreateCulture(getLangue()); //string nr = Request.QueryString["Id"]; string nr = Request.Url.AbsolutePath.Split('/').Last(); Categorie c = CategoriesRequette.GetCategorieById(nr); return(View(c)); }
// GET: Categories public ActionResult ListeCategories(string order) { // LangueController.CreateCulture(getLangue()); CreateCulture(getLangue()); ViewBag.IdOrder = "Id"; ViewBag.NomOrder = "Nom"; ViewBag.NomOrder = String.IsNullOrEmpty(order) ? "Nom" : ""; if (order == null) { order = "Nom"; } ViewBag.Cat = CategoriesRequette.lesCategories(order); return(View()); }
public ActionResult DeleteCateg(Categorie c) { CategoriesRequette.Supprimer(c); return(RedirectToAction("Index", "Home")); }