Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 /// <returns></returns>
 public override IList <Manager> GetAllByPage(int pageIndex, int pageSize)
 {
     try
     {
         IList <decimal> ids   = accessPort.GetAccessibleManagers();
         int             count = this.GetRecordCount();
         if (pageSize > 0 && pageIndex <= (int)(count / pageSize))
         {
             IList <Manager> result = managerRep.GetAllByPage(pageIndex, pageSize, ids.ToArray());
             return(result);
         }
         else
         {
             throw new OutOfExpectedRangeException("0", Convert.ToString(count - 1), Convert.ToString(pageSize * (pageIndex + 1)), "BManager -> GetAllByPage ");
         }
     }
     catch (Exception ex)
     {
         LogException(ex, "BManager", "GetAllByPage");
         throw ex;
     }
 }