Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            LpoStatus lpoStatus = db.LpoStatus.Find(id);

            db.LpoStatus.Remove(lpoStatus);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "LpoStatusId,Name")] LpoStatus lpoStatus)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lpoStatus).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lpoStatus));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "LpoStatusId,Name")] LpoStatus lpoStatus)
        {
            if (ModelState.IsValid)
            {
                db.LpoStatus.Add(lpoStatus);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lpoStatus));
        }
Example #4
0
        // GET: LpoStatus/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LpoStatus lpoStatus = db.LpoStatus.Find(id);

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