34 lines
755 B
C#
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;
|
|
}
|
|
|
|
}
|
|
} |