Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            SPECIALITEM specialitem = db.SPECIALITEMs.Find(id);

            db.SPECIALITEMs.Remove(specialitem);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        //
        // GET: /SPECIALITEMAdmin/Details/5

        public ActionResult Details(string id = null)
        {
            SPECIALITEM specialitem = db.SPECIALITEMs.Find(id);

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

            return(View(specialitem));
        }