// GET: Hra public ActionResult Hra(int?_page, int?_itemsOnPage, bool?vse) { int celkem; bool _vse = vse.HasValue ? vse.Value : false; int itemsOnPage = _itemsOnPage.HasValue ? _itemsOnPage.Value : Utilityzer.DefaultCountPerPage; int page = _page.HasValue ? _page.Value : 1; GameDao gameDao = new GameDao(); IList <Hra> ucty = gameDao.getPaged(itemsOnPage, page, out celkem, _vse); ViewBag.pages = (int)Math.Ceiling((double)celkem / (double)itemsOnPage); ViewBag.soucasna = page; ViewBag.vse = vse; ViewBag.perPage = itemsOnPage; ViewBag.celkem = celkem; if (Request.IsAjaxRequest()) { return(PartialView("HraAjax", ucty)); } return(View(ucty)); }