public IActionResult CreateFourniture(string nom) { Fourniture model = new Fourniture { Nom = nom }; db.Fournitures.Add(model); db.SaveChanges(); return(RedirectToAction("Create")); }
public IActionResult Create(Mobilier model) { if (ModelState.IsValid) { db.Mobiliers.Add(model); db.SaveChanges(); return(RedirectToAction("Index")); } LLocal(); return(View(model)); }
public IActionResult Create(Diagnostique model, string idmat, string description, string marque) { model.MaterielID = idmat; if (ModelState.IsValid) { db.Diagnostiques.Add(model); db.SaveChanges(); return(RedirectToAction("Detail", "Materiel", new { id = idmat })); } ViewBag.IDMateriel = idmat; ViewBag.Desc = description; ViewBag.Marq = marque; return(View(model)); }
public IActionResult newLocalisation(string nom) { Localisation model = new Localisation { Nom = nom }; db.Localisations.Add(model); db.SaveChanges(); Liste(); return(RedirectToAction("Index")); }