using System.Collections.Generic; using BeWo.Data; using BeWo.Data.Access; using BeWo.Data.Entities; using BeWo.Service.Core; using BeWo.Service.DCEntityMapper; using BeWo.Service.Plugins; using BS.Shared; using BS.Shared.DataContracts.Compact; using DevExpress.Data.Browsing; namespace AlphaEv.Service { public class CustomEmployeeService : EmployeeService { public override List GetAllTeamsCompact() { if (Utils.UserHasRight(LoggedInUserOperationContextExt.Current.User, UserRightType.TeamView_ViewAll)) { return MapperFactory.CompactTeamDC_Team.MapToNewDCs(DAOFactory.GenericDAO.GetAllActive()); } var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(LoggedInUserOperationContextExt.Current.User.Employee.Oid.Value); return MapperFactory.CompactTeamDC_Team.MapToNewDCs(teams); } } }