Files
BeWoPlaner/Service/Plugins/HomeContentGenerator.cs
Christian a9a0b46368 Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
# Conflicts:
#	BeWoPlanerMobil/Views/Main/Main.cshtml
2018-06-13 14:38:35 +02:00

43 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Service.DCEntityMapper;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
namespace BeWo.Service.Plugins
{
public class HomeContentGenerator : AbstractIDSpecificDefaultClass<HomeContentGenerator>
{
public virtual List<CompactPersonDC> GetPersonsHavingBirthday(DateTime birthdayUntil)
{
return MapperFactory.CompactPersonDC_Person.MapToNewDCs(
DAOFactory.SearchDAO.FindPersonsHavingBirthday(birthdayUntil));
}
public virtual List<CompactSupportConceptDC> GetExpiringSupportConcepts(long? employeeOid,
DateTime expiredUntil)
{
var list = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(
DAOFactory.SearchDAO.FindExpiringSupportConcepts(employeeOid, DateTime.Now.Date, expiredUntil));
return list.Where(s => s.StartDate.HasValue && s.EndDate.HasValue).ToList();
}
public virtual List<TaskDC> GetTasksForEmployee(long employeeOid)
{
return MapperFactory.TaskDC_Task.MapToNewDCs(DAOFactory.SearchDAO.FindTasksForEmployee(employeeOid));
}
public virtual List<CompactSupportConceptDC> GetSupportConceptsWithConferenceDate(long? employeeOid,
DateTime conferenceDateUntil)
{
return MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(
DAOFactory.SearchDAO.FindSupportConceptsWithConferenceDate(employeeOid, conferenceDateUntil));
}
}
}