public JsonResult SaveDetails(long id, string detailJson) { var apiResult = new APIResult(); try { PosConsume model = PosConsumeBll.GetById(id); model.Details = JsonConvert.DeserializeObject <List <PosConsumeDetail> >(detailJson); PosConsumeBll.AddOrUpdate(model, UserContext.CurrentUser.HotelId); } catch (Exception ex) { apiResult.Ret = -1; apiResult.Msg = ex.Message; } return(Json(apiResult)); }