public ActionResult DeleteConfirmed(int id) { ProductOrder productOrder = ProductOrderDB.GetProductOrderById(id); ProductOrderDB.DeleteProductOrder(productOrder); return(RedirectToAction("Index")); }
// GET: ProductOrders/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProductOrder productOrder = ProductOrderDB.GetProductOrderById(id); if (productOrder == null) { return(HttpNotFound()); } return(View(productOrder)); }
// GET: ProductOrders/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProductOrder productOrder = ProductOrderDB.GetProductOrderById(id); if (productOrder == null) { return(HttpNotFound()); } ViewBag.ProductId = new SelectList(db.Miniatures, "MiniId", "Name", productOrder.ProductId); ViewBag.OrderId = new SelectList(db.Orders, "OrderId", "OrderId", productOrder.OrderId); return(View(productOrder)); }