diff --git a/ReportImp/AuswegHeikePuetz/CustomReportCreator.cs b/ReportImp/AuswegHeikePuetz/CustomReportCreator.cs index 5aeeb540f..caccd8a1f 100644 --- a/ReportImp/AuswegHeikePuetz/CustomReportCreator.cs +++ b/ReportImp/AuswegHeikePuetz/CustomReportCreator.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Data; using System.Globalization; using System.IO; +using System.Linq; using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Report; @@ -60,7 +61,8 @@ namespace Ausweg Team team = DAOFactory.GenericDAO.GetByID((long)teamOid); if (team != null) { - foreach (var employee in team.MemberList) + var teamEmployees = team.MemberList.OrderBy(e => e.Person.LastNameFirstName).ToList(); + foreach (var employee in teamEmployees) { bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht); } @@ -69,8 +71,7 @@ namespace Ausweg else { // kein Mitarbeiter oder Team ausgewaehlt, Bericht wird fuer alle Mitarbeiter erstellt - var allEmployees = DAOFactory.GenericDAO.GetAllActiveAndArchived(); - + var allEmployees = DAOFactory.GenericDAO.GetAllActiveAndArchived().OrderBy(e => e.Person.LastNameFirstName).ToList(); foreach (var employee in allEmployees) { bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht);