Exemplo n.º 1
0
        public static CardList getPageItems(CardSearchModel model, int numPage)
        {
            CardList displayCards = new CardList();

            displayCards.PageNum = numPage;
            int nbrCards = model.AllCards.Count();

            displayCards.PageCount = (int)Math.Floor((decimal)(nbrCards / displayCards.PageSize)) + 1;
            displayCards.Cards     = model.AllCards.Skip(displayCards.PageSize * (numPage - 1)).Take(displayCards.PageSize);
            return(displayCards);
        }
Exemplo n.º 2
0
 public CardSearchModel()
 {
     DisplayedCards = new CardList();
 }