public ActionResult LoadProductivityReports(int goalId) { var goal = _goalsProvider.GetById(goalId); var todoItems = _todoItemsProvider.GetAll(goal.Id).Where(x => x.Resolved).OrderBy(x => x.Deadline).ToList(); return(Json(todoItems.ProductivityReports(goal))); }
public string LoadProductivityReports(int id) { var goal = _goalsProvider.GetById(id); var todoItems = _todoItemsProvider.GetAll(goal.Id).Where(x => x.Resolved).OrderBy(x => x.Deadline).ToList(); return(todoItems.ProductivityReports(goal).Serialize()); }
public ActionResult GetAll(int goalId) { var data = goalId == 0 ? _todoItemsProvider.GetAll() : _todoItemsProvider.GetAll(goalId); return(Json(data.Select(x => new ToDoItemDto(x)).ToList())); }
public string GetAll(int goalId) { var data = goalId == 0 ? _todoItemsProvider.GetAll() : _todoItemsProvider.GetAll(goalId); return(data.Select(x => new ToDoItemDto(x)).ToList().Serialize()); }