コード例 #1
0
ファイル: TodoListService.cs プロジェクト: periface/SapTam
        public TodoListOutput GetTodoLists(int projectId)
        {
            var todoLists = _toDoListManager.GeToDoLists(projectId);

            return(new TodoListOutput()
            {
                ToDoList = todoLists.Select(a => a.MapTo <ToDoListDto>())
            });
        }
コード例 #2
0
        private void ProcessTaskLists(ProjectManageDto projectDetails, int projectId)
        {
            var lists     = _toDoListManager.GeToDoLists(projectId);
            var toDoLists = lists as IList <ToDoList> ?? lists.ToList();

            if (toDoLists.Any())
            {
                var todoLists = toDoLists.Select(toDoList => toDoList.MapTo <ToDoListDto>()).ToList();
                projectDetails.ToDoLists    = todoLists;
                projectDetails.HasTodoTasks = true;
            }
            else
            {
                projectDetails.HasTodoTasks = false;
            }
        }