public IActionResult GetById(int id) { var task = _taskServices.GetById(id); var subTasks = _subTaskServices.GetAll(id); ViewBag.SubTasks = subTasks; return(View(task)); }
public IActionResult NotDoneTasks() { List <ToDoTask> allNotDoneTasks = _taskService.GetAllTasks().Where(x => x.Status == TypeStatus.NotDone).ToList(); foreach (var task in allNotDoneTasks) { foreach (var subtask in _subTaskService.GetAll().Where(x => x.TaskID == task.Id)) { task.SubTasks.Add(subtask); } } ; ToDoTaskViewModel model = new ToDoTaskViewModel() { Tasks = allNotDoneTasks }; return(View(model)); }
public IActionResult GetAll(int id) { var subTasks = _subTaskServices.GetAll(id); return(PartialView(subTasks)); }
public IEnumerable <SubTask> GetAll() { return(_subTaskService.GetAll()); }