예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AccetpOrder accetpOrder = db.AccetpOrder.Find(id);

            db.AccetpOrder.Remove(accetpOrder);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 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));
 }
예제 #3
0
        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));
        }
예제 #4
0
        // 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));
        }