private static void PrintStatistics(Employee employee, List<Duty> duties) { var empduties = duties.Where(x => x.Employee.Equals(employee)).ToList(); var weekCount = empduties.Count(x => x.Type == DutyType.Week); var weekendCount = empduties.Count(x => x.Type == DutyType.Weekend); Debug.Write(String.Format("week: {0} weekend: {1} score: {2}", weekCount, weekendCount, _scoringfunction.Calculate(duties))); }
protected bool Equals(Employee other) { return string.Equals(Name, other.Name); }
public EmployeeSchedule(Employee employee) { Employee = employee; }