// POST: api/cliente public IHttpActionResult Post([FromBody] RatingEvento value) { try { ControlRating.devolverInstacia().grabar(value); return(Ok(value)); } catch (Exception ex) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Data)); } }
// POST: api/cliente public IHttpActionResult Post([FromBody] RatingEvento value) { try { Inscripcion inscripcion = ControlInscripcion.devolverInstacia().devolverXsocioXevento(value.idEvento, value.idSocio); ControlRating.devolverInstacia().grabar(value); inscripcion.estadoEncuesta = true; ControlInscripcion.devolverInstacia().update(inscripcion); return(Ok(value)); } catch (Exception ex) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.BadRequest, ex.Data)); } }
// GET: api/cliente public IEnumerable <RatingEvento> Get() { return(ControlRating.devolverInstacia().devolverTodos()); }