Exemple #1
0
        public IActionResult GetBoatDetailsRent(ModelRentBoat model)
        {
            if (model.RentId != null)
            {
                int myresponse = BusinessUser.StopRent(model);
                return(StatusCode(200, myresponse));
            }
            string result = BusinessUser.NewRent(model);

            if (result == "-1")
            {
                Response.StatusCode = (int)HttpStatusCode.InternalServerError;
                return(Json(new { Message = "-1" }));
            }
            return(Json("ok"));
        }