Esempio n. 1
0
        public ActionResult DeleteConfirmed(decimal id)
        {
            DM_DVT dm_dvt = db.DM_DVT.Find(id);

            db.DM_DVT.Remove(dm_dvt);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        //
        // GET: /DVT/Delete/5

        public ActionResult Delete(decimal id = 0)
        {
            DM_DVT dm_dvt = db.DM_DVT.Find(id);

            if (dm_dvt == null)
            {
                return(HttpNotFound());
            }
            return(View(dm_dvt));
        }
Esempio n. 3
0
 public ActionResult Edit(DM_DVT dm_dvt)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dm_dvt).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dm_dvt));
 }
Esempio n. 4
0
        public ActionResult Create(DM_DVT dm_dvt)
        {
            if (ModelState.IsValid)
            {
                db.DM_DVT.Add(dm_dvt);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dm_dvt));
        }