public List<string> GetAllowedServicesLIst(List<int> roles) { List<string> allowedServicesList = new List<string>(); if (roles.Count == 1 && roles.Contains(Convert.ToInt32(SIMPLDbEnums.RoleTypeEnum.Tech))) { allowedServicesList = new TechRoleServiceFilter().GetAllowedServicesList(); } else if (roles.Count == 1 && roles.Contains(Convert.ToInt32(SIMPLDbEnums.RoleTypeEnum.RepairHelpdesk))) { allowedServicesList = new RepairHelpDeskRoleServiceFilter().GetAllowedServicesList(); } return allowedServicesList; }
public List<string> GetFilteredChildServicesList(List<int> roles) { List<string> filteredChildServices = new List<string>(); if (roles.Count == 1 && roles.Contains(Convert.ToInt32(SIMPLDbEnums.RoleTypeEnum.Tech))) { filteredChildServices = new TechRoleServiceFilter().GetFilteredChildServices(); } else if (roles.Count == 1 && roles.Contains(Convert.ToInt32(SIMPLDbEnums.RoleTypeEnum.RepairHelpdesk))) { filteredChildServices = new RepairHelpDeskRoleServiceFilter().GetFilteredChildServices(); } return filteredChildServices; }
public List<ServiceDto> FilterServicesList(List<ServiceDto> availableServices, List<int> roles) { List<ServiceDto> filteredServices = null; if (roles.Count == 1 && roles.Contains(Convert.ToInt32(SIMPLDbEnums.RoleTypeEnum.Tech))) { filteredServices = new TechRoleServiceFilter().GetFilteredServices(availableServices); } else if(roles.Count == 1 && roles.Contains(Convert.ToInt32(SIMPLDbEnums.RoleTypeEnum.RepairHelpdesk))) { filteredServices = new RepairHelpDeskRoleServiceFilter().GetFilteredServices(availableServices); } else { filteredServices = availableServices; } return filteredServices; }