// GET: /Admin/Product/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Product product = objProductBO.GetProduct(id.Value); if (product == null) { return(HttpNotFound()); } return(View(product)); }
public ActionResult ConfirmOrder(BillingAddress objBillingAddress) { objBillingAddressBO.InsertBillingAddress(objBillingAddress); int addressId = objBillingAddress.PKAddressId; HttpCookie CartCookie = Request.Cookies[Helper.UserName]; foreach (var items in CartCookie.Values) { string cookieValue = CartCookie[items.ToString()].ToString(); var product = objProductBO.GetProduct(Convert.ToInt32(items)); objOrder.FKProductId = product.PKProductId; objOrder.FKBillingAddressId = addressId; objOrder.Status = "Processing"; objOrder.CustomerComment = cookieValue.Split('^')[2]; objOrderBO.InsertOrder(objOrder); objOrderDetail.FKProductId = product.PKProductId; objOrderDetail.FKOrderId = objOrder.PKOrderId; objOrderDetail.Cost = Convert.ToDecimal(cookieValue.Split('^')[1]); objOrderDetail.Quantity = Convert.ToInt32(cookieValue.Split('^')[0]); objOrderDetailBO.InsertOrderDetail(objOrderDetail); objOrderHistory.FKOrderId = objOrder.PKOrderId; objOrderHistory.Status = objOrder.Status; objOrderHistoryBO.InsertOrderHistory(objOrderHistory); } CartCookie.Expires = DateTime.Now.AddDays(-1); Response.Cookies.Add(CartCookie); return(RedirectToAction("GetOrderDetails", "MyOrder")); }
public ActionResult Details(long i) { ProductBO cls = new ProductBO(); var model = cls.GetProduct(i); _session.IsLogin = false; return View(model); }
public ActionResult Details(long i) { ProductBO cls = new ProductBO(); var model = cls.GetProduct(i); _session.IsLogin = false; return(View(model)); }
public ActionResult GetProductDetails(int productId, string imagePath) { ViewBag.ProductId = productId; ViewBag.Imagepath = imagePath; return(View(objProductBO.GetProduct(productId))); }