// 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));
     }
 }
Exemple #2
0
        // 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));
            }
        }
Exemple #3
0
 // GET: api/cliente
 public IEnumerable <RatingEvento> Get()
 {
     return(ControlRating.devolverInstacia().devolverTodos());
 }