AuswegHeikePuetz: Im Bericht für Arbeitstage mit mehr als 8h Mitarbeiter alphabetisch sortieren
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using BeWo.Data.Access;
|
using BeWo.Data.Access;
|
||||||
using BeWo.Data.Entities;
|
using BeWo.Data.Entities;
|
||||||
using BeWo.Report;
|
using BeWo.Report;
|
||||||
@@ -60,7 +61,8 @@ namespace Ausweg
|
|||||||
Team team = DAOFactory.GenericDAO.GetByID<Team>((long)teamOid);
|
Team team = DAOFactory.GenericDAO.GetByID<Team>((long)teamOid);
|
||||||
if (team != null)
|
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);
|
bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht);
|
||||||
}
|
}
|
||||||
@@ -69,8 +71,7 @@ namespace Ausweg
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// kein Mitarbeiter oder Team ausgewaehlt, Bericht wird fuer alle Mitarbeiter erstellt
|
// kein Mitarbeiter oder Team ausgewaehlt, Bericht wird fuer alle Mitarbeiter erstellt
|
||||||
var allEmployees = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>();
|
var allEmployees = DAOFactory.GenericDAO.GetAllActiveAndArchived<Employee>().OrderBy(e => e.Person.LastNameFirstName).ToList();
|
||||||
|
|
||||||
foreach (var employee in allEmployees)
|
foreach (var employee in allEmployees)
|
||||||
{
|
{
|
||||||
bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht);
|
bericht = CreateAndAddArbeitstageMehrAls8hBericht((long)employee.Oid, startDate, endDate, bericht);
|
||||||
|
|||||||
Reference in New Issue
Block a user