Exemple #1
0
        public ActionResult Show(string id, int?page)
        {
            if (id == null || id == string.Empty)
            {
                return(RedirectToAction("Empty"));
            }

            string nomeDoTopic = Server.HtmlDecode(id);

            TopicModel topic = new TopicService().GetTopic(nomeDoTopic);

            if (topic != null)
            {
                var pageNumber = page ?? 1;

                ViewBag.Topic = topic;
                IList <PointModel> points = service.GetActivePoints(topic);
                return(View(points.ToPagedList(pageNumber, 10)));
            }

            return(RedirectToAction("Empty"));
        }