Ejemplo n.º 1
0
 public IEnumerable <POs> GetPOs()
 {
     return(pORepository
            .GetAll()
            .Select(p => p.AutoMapObject <DB.POs, POs>())
            .OrderByDescending(c => c.PoId));
 }
        // GET: PurchaseOrders
        public ActionResult Index(int?page = 1)
        {
            var purchaseOrders = _poRepo.GetAll();

            ViewBag.page = page;
            //get full list of purchase ordered by most recently created
            return(View(purchaseOrders.ToList().OrderByDescending(x => x.PoNum)
                        .ToPagedList(pageNumber: Convert.ToInt32(page), pageSize: 15)));
        }