Ejemplo n.º 1
0
        public List <P_Point> GetPoints()
        {
            if (_cachedPoints != null)
            {
                return(_cachedPoints);
            }

            return(_cachedPoints = _pointService.GetPoints());
        }
Ejemplo n.º 2
0
        public ActionResult Index(int?page)
        {
            int pageNumber = page ?? 1;

            int begin = pageNumber * QTD;

            IEnumerable <PointModel> AllPoints = service.GetPoints(begin, QTD);
            var onePage = AllPoints.ToPagedList(1, QTD);

            int totalPoints = service.GetTotalPoints();
            IEnumerable <string> totalPages = Enumerable.Repeat(string.Empty, totalPoints);

            ViewBag.TotalPages = totalPages.ToPagedList(pageNumber, QTD);
            ViewBag.OnePage    = onePage;

            return(View());
        }
Ejemplo n.º 3
0
 // GET: api/Points
 public IEnumerable <PointDto> GetPoints()
 {
     return(psvc.GetPoints().Select(b => PointDto.FromPoint(b)));
 }