private bool IsDirectoryLevel(Student student) { var hasRightsToSchool = AssociatedSchoolIds.Contains(student.SchoolId); var hasProviderAccessRights = AssociatedProviderIds.Intersect(student.ApprovedProviders.Select(ap => ap.Id)).Any(); return(!IsAdministrator && !hasRightsToSchool && !hasProviderAccessRights); }
private string CreateCheckbox(Student student) { var hasRightsToSchool = AssociatedSchoolIds.Contains(student.SchoolId); if (IsAdministrator || hasRightsToSchool || IsProvider) { return(student.Id.ToString(CultureInfo.CurrentCulture)); } return(string.Empty); }