コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Order_Del order_Del = db.Order_Del.Find(id);

            db.Order_Del.Remove(order_Del);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Order_ID,Bouquet_ID,Florist_ID,Cust_ID,Driver_ID,Order_Date,Bouquet_Quontity,Date_Delived,Order_Status,Total_Price,Size_Bouquets")] Order_Del order_Del)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order_Del).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Bouquet_ID = new SelectList(db.Bouquets, "Bouquet_ID", "Bouquet_Name", order_Del.Bouquet_ID);
     ViewBag.Cust_ID    = new SelectList(db.Cust2, "Cust_ID", "Fname", order_Del.Cust_ID);
     ViewBag.Driver_ID  = new SelectList(db.Drivers, "Driver_ID", "Driver_DLicence", order_Del.Driver_ID);
     ViewBag.Florist_ID = new SelectList(db.Florists, "Florist_ID", "Frorist_Fname", order_Del.Florist_ID);
     return(View(order_Del));
 }
コード例 #3
0
        // GET: Order_Del/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Order_Del order_Del = db.Order_Del.Find(id);

            if (order_Del == null)
            {
                return(HttpNotFound());
            }
            return(View(order_Del));
        }
コード例 #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Order_Del order_Del = db.Order_Del.Find(id);

            if (order_Del == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Bouquet_ID = new SelectList(db.Bouquets, "Bouquet_ID", "Bouquet_Name", order_Del.Bouquet_ID);
            ViewBag.Cust_ID    = new SelectList(db.Cust2, "Cust_ID", "Fname", order_Del.Cust_ID);
            ViewBag.Driver_ID  = new SelectList(db.Drivers, "Driver_ID", "Driver_DLicence", order_Del.Driver_ID);
            ViewBag.Florist_ID = new SelectList(db.Florists, "Florist_ID", "Frorist_Fname", order_Del.Florist_ID);
            return(View(order_Del));
        }