public JsonResult OrderDetails(ShoppingCartModel model) { try { if (Session["USERNAME"].ToString() == null) { return(null); } else { List <OrderDetailsModel> orderDetails = model.getOrderDetails(); return(Json(new { Result = "OK", Records = orderDetails }, JsonRequestBehavior.AllowGet)); } } catch (Exception ex) { return(Json(new { Result = "OK", Message = ex.Message })); } }