Beispiel #1
0
        public ActionResult List(PagingCommand command, string name)
        {
            IPagedList <Log4NetLog> list = _log4NetService.ListErrorLogs(command, name);

            ViewBag.Name = name;
            return(View(list));
        }
Beispiel #2
0
        public IPagedList <Log4NetLog> ListErrorLogs(PagingCommand command, string name)
        {
            var pageLogs = _log4NetRepository.FetchPaged(q => q.
                                                         Where(e => string.IsNullOrEmpty(name) || e.Logger == name).OrderByDescending(t => t.Date),
                                                         command.PageIndex, command.PageSize);

            return(pageLogs);
        }
        public ActionResult Index(PagingCommand command)
        {
            command.CustomerId = Customer.CustomerId;
            command.UserType   = _userType;
            UsersListModel model = _userService.List(command);

            return(View(model));
        }
Beispiel #4
0
        public ActionResult Notes(Guid id, PagingCommand command)
        {
            NotesViewModel model = _customerService.Notes(id, command);

            model.CustomerNote = new NotesViewModel.Note {
                CustomerId = id
            };
            return(View(model));
        }
Beispiel #5
0
        public CustomersListModel List(PagingCommand command, Func <IQueryable <Customer>, IQueryable <Customer> > query)
        {
            var customers = _customerRepository.FetchPaged(query, command.PageIndex, command.PageSize);

            var model = new CustomersListModel
            {
                Customers = Mapper.Engine.MapPaged <Customer, CustomersListModel.CustomerSummary>(customers)
            };

            return(model);
        }
Beispiel #6
0
        public PlansListModel List(PagingCommand command)
        {
            var plans = _planRepository.FetchPaged(q => q.OrderBy(t => t.OrderIndex), command.PageIndex,
                                                   command.PageSize);
            var model = new PlansListModel
            {
                Plans = Mapper.Engine.MapPaged <Plan, PlansListModel.PlanSummary>(plans)
            };

            return(model);
        }
Beispiel #7
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);
        }
Beispiel #8
0
        public EmailTemplateListModel List(PagingCommand command)
        {
            IPagedList <EmailTemplate> emailTemplates = _emailTemplatesRepository.FetchPaged(q => q.OrderBy(t => t.TemplateName),
                                                                                             command.PageIndex, command.PageSize);

            EmailTemplateListModel model = new EmailTemplateListModel
            {
                EmailTemplates =
                    Mapper.Engine.MapPaged <EmailTemplate, EmailTemplateListModel.EmailTemplateSummary>(
                        emailTemplates)
            };

            return(model);
        }
Beispiel #9
0
        public NotesViewModel Notes(Guid customerId, PagingCommand command)
        {
            var notes =
                _noteRepository.FetchPaged(
                    q => q.Where(n => n.CustomerId == customerId).OrderByDescending(t => t.CreatedOn), command.PageIndex,
                    command.PageSize);

            var model = new NotesViewModel
            {
                Notes = Mapper.Engine.MapPaged <Note, NotesViewModel.Note>(notes)
            };

            return(model);
        }
Beispiel #10
0
        public UsersListModel List(PagingCommand command)
        {
            var users = _userRepository.FetchPaged(
                q => q.Where(u => u.UserTypeString == command.UserType.ToString() && u.CustomerId == command.CustomerId).OrderBy(u => u.FirstName).ThenBy(u => u.LastName),
                command.PageIndex,
                command.PageSize
                );

            var model = new UsersListModel
            {
                Users = Mapper.Engine.MapPaged <User, UsersListModel.UserSummary>(users)
            };

            return(model);
        }
 public Task <ListRoleDto> GetAll(PagingCommand input)
 {
     throw new NotImplementedException();
 }
Beispiel #12
0
        public ActionResult Index(PagingCommand command)
        {
            PlansListModel model = _planService.List(command);

            return(View(model));
        }
Beispiel #13
0
        public ActionResult Index(PagingCommand command)
        {
            TemplateList = _emailTemplatesService.List(command);

            return(View(TemplateList));
        }
Beispiel #14
0
        public ActionResult Index(PagingCommand command)
        {
            CustomerDashboardModel model = _customerDashboardService.Dashboard(command, Customer.CustomerId);

            return(View(model));
        }