Exemple #1
0
        //[ValidateAntiForgeryToken]
        public ActionResult DeleteConfirmed(int id)
        {
            Opencell opencell = db.Opencells.Find(id);

            db.Opencells.Remove(opencell);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        //
        // GET: /OpenCell/Delete/5

        public ActionResult Delete(int id = 0)
        {
            Opencell opencell = db.Opencells.Find(id);

            if (opencell == null)
            {
                return(HttpNotFound());
            }
            return(View(opencell));
        }
Exemple #3
0
 //[ValidateAntiForgeryToken]
 public ActionResult Edit(Opencell opencell)
 {
     if (ModelState.IsValid)
     {
         db.Entry(opencell).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(opencell));
 }
Exemple #4
0
        // [ValidateAntiForgeryToken]
        public ActionResult Create(Opencell opencell)
        {
            if (ModelState.IsValid)
            {
                db.Opencells.Add(opencell);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(opencell));
        }