public JsonResult Checkout() { int id = 0; try { //removing from shopping cart and add those details to order table CartServices service = new CartServices(); User user = (User)(Session[SessionConstants.SESSION_CONTEXT_INSTANCE]); id = service.Checkout(user.UserId); return(Json(new { Status = true, Message = "Checkout Success" }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { Status = false, Message = "Error Occured" }, JsonRequestBehavior.AllowGet)); } }