Files
BeWoPlaner/ReportImp/Fortis/Service/CustomCustomerService.cs
2026-06-18 11:05:29 +02:00

34 lines
755 B
C#

using System.Collections.Generic;
using BeWo.Data;
using BeWo.Data.Entities;
using BeWo.Data.Security;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.DataContracts.Compact;
namespace Fortis.Service
{
public class CustomCustomerService : CustomerService
{
public override List<CompactCustomerDC> GetAllActiveCustomersCompact(bool fetchReferenceNumbers, long? currentEmployeeOid)
{
var customer = base.GetAllActiveCustomersCompact(fetchReferenceNumbers, currentEmployeeOid);
if (UserRightHelper.LoggedInUserHasRight(UserRightType.Customer_ViewMyTeams))
{
foreach (var c in customer)
{
if (c.IsRelatedToTeam)
{
c.IsRelatedToEmployee = true;
}
}
}
return customer;
}
}
}