Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Order_Details_Extended order_Details_Extended = db.Order_Details_Extended.Find(id);

            db.Order_Details_Extended.Remove(order_Details_Extended);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "OrderID,ProductID,ProductName,UnitPrice,Quantity,Discount,ExtendedPrice")] Order_Details_Extended order_Details_Extended)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order_Details_Extended).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(order_Details_Extended));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "OrderID,ProductID,ProductName,UnitPrice,Quantity,Discount,ExtendedPrice")] Order_Details_Extended order_Details_Extended)
        {
            if (ModelState.IsValid)
            {
                db.Order_Details_Extendeds.Add(order_Details_Extended);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(order_Details_Extended));
        }
Example #4
0
        // GET: Order_Details_Extended/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Order_Details_Extended order_Details_Extended = db.Order_Details_Extended.Find(id);

            if (order_Details_Extended == null)
            {
                return(HttpNotFound());
            }
            return(View(order_Details_Extended));
        }
Example #5
0
 public static Order_Details_Extended CreateOrder_Details_Extended(int orderID, int productID, string productName, decimal unitPrice, short quantity, float discount)
 {
     Order_Details_Extended order_Details_Extended = new Order_Details_Extended();
     order_Details_Extended.OrderID = orderID;
     order_Details_Extended.ProductID = productID;
     order_Details_Extended.ProductName = productName;
     order_Details_Extended.UnitPrice = unitPrice;
     order_Details_Extended.Quantity = quantity;
     order_Details_Extended.Discount = discount;
     return order_Details_Extended;
 }
Example #6
0
 public void AddToOrder_Details_Extendeds(Order_Details_Extended order_Details_Extended)
 {
     base.AddObject("Order_Details_Extendeds", order_Details_Extended);
 }