public ActionResult Update(Magazzino model) { if (ModelState.IsValid) { _oMagazzinoRepo.Update(model); this.DatabaseFactory.GetContext().SaveChanges(); } return RedirectToAction("Index"); }
public ActionResult Delete(Magazzino model) { if (model != null && ModelState.IsValid) { // Aggiorno l'operazione Magazzino oMagazzino = _oMagazzinoRepo.GetEdit().SingleOrDefault(x => x.ID == model.ID); if (oMagazzino != null) _oMagazzinoRepo.Delete(oMagazzino); this.DatabaseFactory.GetContext().SaveChanges(); return RedirectToAction("Index"); } return RedirectToAction("Index"); }
public ActionResult Create() { Magazzino oMagazzino = new Magazzino(); return View(oMagazzino); }