public ActionResult DeleteConfirmed(int id) { AccetpOrder accetpOrder = db.AccetpOrder.Find(id); db.AccetpOrder.Remove(accetpOrder); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "AccetpOrderId,Yes,No")] AccetpOrder accetpOrder) { if (ModelState.IsValid) { db.Entry(accetpOrder).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(accetpOrder)); }
public ActionResult Create([Bind(Include = "AccetpOrderId,Yes,No")] AccetpOrder accetpOrder) { if (ModelState.IsValid) { db.AccetpOrder.Add(accetpOrder); db.SaveChanges(); return(RedirectToAction("AcceptedOrder", "Drivers")); } return(View(accetpOrder)); }
// GET: AccetpOrders/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AccetpOrder accetpOrder = db.AccetpOrder.Find(id); if (accetpOrder == null) { return(HttpNotFound()); } return(View(accetpOrder)); }