Esempio n. 1
0
        public CustomerDashboardModel Dashboard(PagingCommand command, Guid customerId)
        {
            IPagedList <Project> projects = _projectRepository.FetchPaged(q => q.Where(p => p.CustomerId == customerId), command.PageIndex,
                                                                          command.PageSize);

            var model = new CustomerDashboardModel
            {
                Projects = Mapper.Engine.MapPaged <Project, CustomerDashboardModel.ProjectSummary>(projects)
            };

            return(model);
        }
Esempio n. 2
0
        public ActionResult Index(PagingCommand command)
        {
            CustomerDashboardModel model = _customerDashboardService.Dashboard(command, Customer.CustomerId);

            return(View(model));
        }