public ActionResult UpdateVesselCost(OfferCostModel cost) { OfferServices ser = new OfferServices(); try { var res = ser.UpdCost(cost); if (res.Status != Status.Success) { throw new Exception(string.Format("{0}: {1}", "Error al actualizar costos", res.Message)); } return(Json(res, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Response.StatusCode = (int)HttpStatusCode.BadRequest; Response.StatusDescription = ex.Message; return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }