コード例 #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));
        }