Files
BeWoPlaner/Service/Plugins/HomeContentGenerator.cs

43 lines
1.7 KiB
C#
Raw Normal View History

2016-06-27 01:45:38 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BeWo.Data.Access;
using BeWo.Service.DCEntityMapper;
using BS.Shared.Core;
2017-06-07 15:23:30 +02:00
using BS.Shared.DataContracts;
2016-06-27 01:45:38 +02:00
using BS.Shared.DataContracts.Compact;
namespace BeWo.Service.Plugins
{
2017-09-14 19:03:26 +02:00
public class HomeContentGenerator : AbstractIDSpecificDefaultClass<HomeContentGenerator>
{
public virtual List<CompactPersonDC> GetPersonsHavingBirthday(DateTime birthdayUntil)
{
return MapperFactory.CompactPersonDC_Person.MapToNewDCs(
DAOFactory.SearchDAO.FindPersonsHavingBirthday(birthdayUntil));
}
2016-06-27 01:45:38 +02:00
2017-09-14 19:03:26 +02:00
public virtual List<CompactSupportConceptDC> GetExpiringSupportConcepts(long? employeeOid,
DateTime expiredUntil)
{
var list = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(
2017-09-14 19:03:26 +02:00
DAOFactory.SearchDAO.FindExpiringSupportConcepts(employeeOid, DateTime.Now.Date, expiredUntil));
return list.Where(s => s.StartDate.HasValue && s.EndDate.HasValue).ToList();
2017-02-01 13:53:59 +01:00
}
2017-06-07 15:23:30 +02:00
2017-09-14 19:03:26 +02:00
public virtual List<TaskDC> GetTasksForEmployee(long employeeOid)
{
2017-06-07 15:23:30 +02:00
return MapperFactory.TaskDC_Task.MapToNewDCs(DAOFactory.SearchDAO.FindTasksForEmployee(employeeOid));
}
2017-09-14 19:03:26 +02:00
public virtual List<CompactSupportConceptDC> GetSupportConceptsWithConferenceDate(long? employeeOid,
DateTime conferenceDateUntil)
{
return MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDCs(
DAOFactory.SearchDAO.FindSupportConceptsWithConferenceDate(employeeOid, conferenceDateUntil));
}
}
2016-06-27 01:45:38 +02:00
}