Ejemplo n.º 1
0
        public ActionResult GetRating(int gossipId)
        {
            var ratingService = new RatingService();

            var ratingType = ratingService.getRating(gossipId);
            var ratingJson = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(ratingType);
            return Json(ratingJson, JsonRequestBehavior.AllowGet);
        }
Ejemplo n.º 2
0
 public ActionResult AddRating(Rating rating)
 {
     var ratingService = new RatingService();
     ratingService.AddOrChangeRating(rating.gossipId, rating.RatingType);
     return Json(new { success = true });
 }