예제 #1
0
        public ActionResult Update(Magazzino model)
        {
            if (ModelState.IsValid)
            {
                _oMagazzinoRepo.Update(model);
                this.DatabaseFactory.GetContext().SaveChanges();

            }
            return RedirectToAction("Index");
        }
예제 #2
0
        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");
        }
예제 #3
0
        public ActionResult Create()
        {
            Magazzino oMagazzino = new Magazzino();

            return View(oMagazzino);
        }