Ejemplo n.º 1
0
        //private static readonly ILog log = LogManager.GetLogger(typeof (Program)) ;

        public ActionResult Index()
        {
            var bolService = new BOLService.BOLService();
            var obj        = new ImageDisplay();

            obj.PageIndex = new Random().Next(0, 5);
            obj.PageSize  = 500;
            obj.ListImg   = bolService.GetImgLinks(obj.PageIndex, obj.PageSize);
            if (obj.ListImg.Count == 0)
            {
                obj.ListImg = bolService.GetImgLinks(0, obj.PageSize);
            }
            return(View(obj));
        }
Ejemplo n.º 2
0
        //
        // GET: /Lasted/

        public ActionResult Index()
        {
            var bolService = new BOLService.BOLService();
            var obj        = new ImageDisplay();

            obj.PageIndex = 0;
            obj.PageSize  = 1000;
            obj.ListImg   = bolService.GetImgLinks(obj.PageIndex, obj.PageSize);
            return(View(obj));
        }
Ejemplo n.º 3
0
        public ActionResult GetNewImages(int iPageIndex, int iPageSize)
        {
            var bolService = new BOLService.BOLService();

            if (iPageIndex < 0)
            {
                iPageIndex = bolService.TotalImages() / iPageIndex;
            }

            var data = bolService.GetImgLinks(iPageIndex, iPageSize).Select(o => new ListItem()
            {
                Id   = o.ID,
                Name = o.linkimg
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }