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