Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            TransitionMethod transitionMethod = db.TransitionMethods.Find(id);

            db.TransitionMethods.Remove(transitionMethod);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "TransitionId,TransitionName,Description")] TransitionMethod transitionMethod)
 {
     if (ModelState.IsValid)
     {
         db.Entry(transitionMethod).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(transitionMethod));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "TransitionId,TransitionName,Description")] TransitionMethod transitionMethod)
        {
            if (ModelState.IsValid)
            {
                db.TransitionMethods.Add(transitionMethod);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(transitionMethod));
        }
Beispiel #4
0
        // GET: Admin/TransitionMethods/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TransitionMethod transitionMethod = db.TransitionMethods.Find(id);

            if (transitionMethod == null)
            {
                return(HttpNotFound());
            }
            return(View(transitionMethod));
        }