/// <summary> /// Gets if the person is locked /// </summary> /// <param name="personId">The person id</param> /// <returns>If the person </returns> public async Task <bool> GetIsParticipantPersonLockedAsync(int personId) { var person = await PersonQueries.CreateGetSimplePersonDTOByIdQuery(this.Context, personId).FirstOrDefaultAsync(); var isParticipantPersonLocked = false; if (person != null && person.ProjectId.HasValue && person.ParticipantId.HasValue) { var participant = await GetParticipantPersonByIdAsync(person.ProjectId.Value, person.ParticipantId.Value); if (participant != null && participant.SevisStatusId.HasValue && Participant.LOCKED_SEVIS_COMM_STATUSES.Contains(participant.SevisStatusId.Value)) { isParticipantPersonLocked = true; } } return(isParticipantPersonLocked); }