Ejemplo n.º 1
0
        public ActionResult GetAllOrders(int?page) //All order by supplier
        {
            const int pageSize   = 10;             //for testing purpose, to be adjustetd, PAGING NOT IMPLEMENTED YET
            int       pageIndex  = (page ?? 1) - 1;
            int       pageNumber = (page ?? 1);

            var currentUser = UserManager.FindById(User.Identity.GetUserId());
            var prfileId    = currentUser.UserProfile.Id;
            var supplierId  = _merchantService.FindSupplierBy(prfileId).Id;

            ViewBag.SupplierId = supplierId;

            var allOrders = _orderProcessingService.OrderListBySupplier(supplierId).ToPagedList(pageNumber, pageSize);

            return(PartialView("_AllOrders", allOrders));
        }