45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using BeWo.Service.Plugins;
|
|
using BS.Shared.DataContracts.Compact;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace KundeXyz.Service
|
|
{
|
|
public class CustomCustomerService : CustomerService
|
|
{
|
|
public override List<CompactSupportConceptDC> GetAllSupportConceptsCompact(long currentEmployeeOid)
|
|
{
|
|
var result = base.GetAllSupportConceptsCompact(currentEmployeeOid);
|
|
|
|
foreach (var sc in result)
|
|
{
|
|
bool expires = false;
|
|
|
|
DateTime? date = sc.EndDate;
|
|
|
|
if (sc.Customer.TerminationDate.HasValue)
|
|
{
|
|
if (sc.Customer.TerminationDate < date)
|
|
{
|
|
date = sc.Customer.TerminationDate;
|
|
}
|
|
}
|
|
|
|
if (date != null)
|
|
{
|
|
expires = date < DateTime.Now.AddMonths(2);
|
|
}
|
|
|
|
|
|
//sc.IsAboutToExpire = expires; // schreibgeschützt
|
|
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
}
|