//______________________________________________________________________________________ /// <summary> /// Product/EmptyCart/abd /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult EmptyCart(string id) { try { if (Session["usertype"] != null) { string LoggedInUser = @User.Identity.Name; ShoppingCartImplementation.EmptyCart(id); return(RedirectToAction("Cart", "Product")); } else { return(RedirectToAction("Cart", "Product")); } } catch (Exception ex) { bool rethrow = ExceptionPolicy.HandleException(ex, "UI Policy"); if (rethrow) { throw; } return(RedirectToAction("Index", "Product")); } }
public ActionResult CheckOut(CheckOutModel checkout) { try { checkout.userdata.UserId = @User.Identity.Name; ViewBag.checkOutMessage = LetsShopImplementation.PlaceOrder(checkout); ShoppingCartImplementation.EmptyCart(@User.Identity.Name); return(View()); } catch (Exception ex) { return(View()); } }
public ActionResult CheckOut(CheckOutModel checkout) { try { checkout.userdata.UserId = @User.Identity.Name; ViewBag.checkOutMessage = LetsShopImplementation.PlaceOrder(checkout); ShoppingCartImplementation.EmptyCart(@User.Identity.Name); return(View()); } catch (Exception ex) { bool rethrow = ExceptionPolicy.HandleException(ex, "UI Policy"); if (rethrow) { throw; } return(View()); } }
//______________________________________________________________________________________ /// <summary> /// Product/EmptyCart/abd /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult EmptyCart(string id) { try { if (Session["usertype"] != null) { string LoggedInUser = @User.Identity.Name; ShoppingCartImplementation.EmptyCart(id); return(RedirectToAction("Cart", "Product")); } else { return(RedirectToAction("Cart", "Product")); } } catch (Exception ex) { return(RedirectToAction("Index", "Product")); } }