Exemple #1
0
        public ActionResult LikeOrDislike(int idNecesidad)
        {
            ServicioNecesidadValoraciones servicioValoraciones = new ServicioNecesidadValoraciones();
            int    idSession     = int.Parse(Session["UserId"].ToString());
            string boton         = (Request.Form["Like"] != null) ? "Like" : (Request.Form["Dislike"] != null) ? "Dislike" : null;
            bool   likeOrDislike = servicioValoraciones.guardarValoracion(idSession, idNecesidad, boton);

            return(RedirectToAction("Home"));
        }
        public bool AgregaLikeOrDislike(int idSession, string boton, int idNecesidad, ServicioNecesidadValoraciones servicioValoraciones)
        {
            bool likeOrDislike = servicioValoraciones.guardarValoracion(idSession, idNecesidad, boton);

            return(likeOrDislike);
        }