public PagedList<Task> GetTaskPagedList(long taskTypeId, int pageIndex, int pageSize, string check, int searchItem) { var taskService = new TaskService(); var taskStatusTypeService = new TaskStatusTypeService(); var taskEmployeeService = new TaskEmployeeService(); PagedList<task> tasks = taskService.GetTaskPagedList(taskTypeId, pageIndex, pageSize, check, searchItem); IEnumerable<Task> taskList = tasks.Select(item => new Task { TaskNumber = item. TaskNumber, EmployeeName = taskEmployeeService . GetEmployeeNames ( item.Id), StartTime = item. StartTime, EndTime = item. EndTime, Status = taskStatusTypeService . Find( item. TaskStatusId) .Name, Memo = item.Memo }); return new PagedList<Task>(taskList, pageIndex, pageSize, tasks.TotalItemCount); }