Ejemplo n.º 1
0
 public IQueryable <Product> GetPage(int elementsPerPage, int page)
 {
     return(BaseSC.GetPage(GetAllProducts(), elementsPerPage, page));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns only the specified amount of customers in a certain page.
 /// The number of pages is calculated with the total amount of customers and the number of customers per page.
 /// The pages start at 1.
 /// </summary>
 /// <param name="elementsPerPage">The number of customers in a page.</param>
 /// <param name="page">The number of the page that will be retrieved.</param>
 /// <returns>An IQueryable with the selected customers.</returns>
 public IQueryable <Customer> GetPage(int elementsPerPage, int page)
 {
     return(BaseSC.GetPage(GetAllCustomers(), elementsPerPage, page));
 }
Ejemplo n.º 3
0
        public int CalculateLastPage(int elementsPerPage)
        {
            int totalElements = CountProducts();

            return(BaseSC.CalculateLastPage(totalElements, elementsPerPage));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Returns only the specified amount of employees in a certain page.
 /// The number of pages is calculated with the total amount of employees and the number of employees per page.
 /// The pages start at 1.
 /// </summary>
 /// <param name="elementsPerPage">The number of employees in a page.</param>
 /// <param name="page">The number of the page that will be retrieved.</param>
 /// <returns>An IQueryable with the selected employees.</returns>
 public IQueryable <Employee> GetPage(int elementsPerPage, int page)
 {
     return(BaseSC.GetPage(GetAllEmployees(), elementsPerPage, page));
 }