public ActionResult DeleteConfirmed(int id) { TSTTicketPriority tSTTicketPriority = db.TSTTicketPriorities.Find(id); db.TSTTicketPriorities.Remove(tSTTicketPriority); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,Name,Description")] TSTTicketPriority tSTTicketPriority) { if (ModelState.IsValid) { db.Entry(tSTTicketPriority).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tSTTicketPriority)); }
public ActionResult Create([Bind(Include = "ID,Name,Description")] TSTTicketPriority tSTTicketPriority) { if (ModelState.IsValid) { db.TSTTicketPriorities.Add(tSTTicketPriority); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tSTTicketPriority)); }
// GET: TSTTicketPriorities/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TSTTicketPriority tSTTicketPriority = db.TSTTicketPriorities.Find(id); if (tSTTicketPriority == null) { return(HttpNotFound()); } return(View(tSTTicketPriority)); }