public ActionResult Delete(string Book_ID) { Service.SQL_ShippingCar SSC = new Service.SQL_ShippingCar(); Model.ShippingCar Data = new Model.ShippingCar(); Data.Customer_Email = Request.Cookies["cookie"]["Account"].ToString(); if (Data.Customer_Email == null) { return(RedirectToAction("Index", "Login")); } Data.Action = "Delete"; Data.Book_ID = Book_ID; SSC.ShoppingCart(Data); return(RedirectToAction("Index", "CheckOut", new { Order_Quantity = 1 })); }
// GET: Shopping public ActionResult Index(string Book_ID, string Book_Name, string Book_Price, int Book_Quantity, string Search, string Book_Img) { Service.SQL_ShippingCar SSC = new Service.SQL_ShippingCar(); Model.ShippingCar Data = new Model.ShippingCar(); Data.Customer_Email = Request.Cookies["cookie"]["Account"].ToString(); Data.Book_ID = Book_ID; Data.Book_Name = Book_Name; Data.Book_Price = Book_Price; Data.Book_Quantity = Book_Quantity; Data.Book_Img = Book_Img; Data.Action = "Insert"; SSC.ShoppingCart(Data); return(RedirectToAction("index", "Inquire", new { Book_Search = Search })); }