public ProjectReport(Project project) { Project = project; TaskEntries = new List <TaskEntryReport>(); if (project.TaskEntries != null) { foreach (TaskEntry taskEntry in project.TaskEntries) { TaskEntries.Add(new TaskEntryReport(taskEntry)); } } AmTaskEntries = project.TaskEntries != null ? project.TaskEntries.Count : 0; TimeTotal = HelperService.CalculateTimespanHMS(project); }
public CustomerReport(Customer customer) { Customer = customer; int taskCount = 0; Projects = new List <ProjectReport>(); foreach (Project project in customer.Projects) { Projects.Add(new ProjectReport(project)); taskCount += project.TaskEntries.Count; } AmProjects = customer.Projects.Count; AmTaskEntries = taskCount; TimeTotal = HelperService.CalculateTimespanHMS(customer); }
public TaskEntryReport(TaskEntry taskEntry) { TaskEntry = taskEntry; TimeTotal = HelperService.CalculateTimespanHMS(taskEntry); }