public ActionResult DispatchItemInOrder(long orderDetailId) { MessageModel model = new MessageModel(); OrderBusinessLogic objOrderBusinessLogic = new OrderBusinessLogic(); try { objOrderBusinessLogic.DispatchItemInOrder(orderDetailId); model.Message = "Item dispatch successfully"; } catch (System.Exception ex) { model.Message = "An error has occured while adding Item to Order"; model.Type = Enumeration.MessageType.Error; logger.Error(model.Message, ex); } var response = new { OrderDetailId = orderDetailId, MessageModel = model }; return(Json(response, JsonRequestBehavior.AllowGet)); }