public ActionResult DeleteConfirmed(int id) { TSTOrderStatus tSTOrderStatus = db.TSTOrderStatuses.Find(id); db.TSTOrderStatuses.Remove(tSTOrderStatus); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "TicketStatusID,Name,Description")] TSTOrderStatus tSTOrderStatus) { if (ModelState.IsValid) { db.Entry(tSTOrderStatus).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tSTOrderStatus)); }
public ActionResult Create([Bind(Include = "TicketStatusID,Name,Description")] TSTOrderStatus tSTOrderStatus) { if (ModelState.IsValid) { db.TSTOrderStatuses.Add(tSTOrderStatus); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tSTOrderStatus)); }
public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TSTOrderStatus tSTOrderStatus = db.TSTOrderStatuses.Find(id); if (tSTOrderStatus == null) { return(HttpNotFound()); } return(View(tSTOrderStatus)); }