public ActionResult AjouterOrModifierCat(VMListeCat vmCat) { if (ModelState.IsValid) { DtoCategorie dtoCat = new DtoCategorie(); if (vmCat.id_cat != 0) { dtoCat.id_cat = vmCat.id_cat; dtoCat.description_cat = vmCat.description_cat; BusComp.ModifierCategorie(dtoCat); } else { dtoCat.id_cat = vmCat.id_cat; dtoCat.description_cat = vmCat.description_cat; BusComp.AjouterCategorie(dtoCat); } TempData["SuccessMessageDeprt"] = "Done !"; return(RedirectToAction("ListeCat")); } else { return(RedirectToAjouterOrModifierCat(vmCat.id_cat)); } }