Exemplo n.º 1
0
        public ActionResult FireFoxExtension()
        {
            var amount     = 50;
            var bolService = new BOLService.BOLService();
            var obj        = new ImageDisplay();

            obj.PageIndex = new Random().Next(0, 5);
            obj.PageSize  = amount;

            obj.ListImg = bolService.GetCoolRandomImgLinks(amount);
            return(View(obj));
        }
Exemplo n.º 2
0
        public ActionResult Index([FromUri] int?amount)
        {
            if (amount.HasValue == false || amount.Value <= 0)
            {
                amount = 50;
            }
            var bolService = new BOLService.BOLService();
            var obj        = new ImageDisplay();

            obj.PageIndex = new Random().Next(0, 5);
            obj.PageSize  = amount.Value;
            obj.ListImg   = bolService.GetCoolRandomImgLinks(amount.Value);
            return(View(obj));
        }
Exemplo n.º 3
0
        public ActionResult GetNewImages(int iPageIndex, int iPageSize)
        {
            var bolService = new BOLService.BOLService();

            var v = bolService.GetCoolRandomImgLinks(iPageSize);

            v.Shuffle();
            var data = v.Select(o => new ListItem()
            {
                Id   = o.ID,
                Name = o.linkimg
            });

            var jsonResult = Json(data, JsonRequestBehavior.AllowGet);

            jsonResult.MaxJsonLength = int.MaxValue;
            return(jsonResult);

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