public async Task OnGetAsync(int positionid) { if (!Certificates.Equals(string.Empty)) { var ids = Certificates.Split("&certificateId="); foreach (var id in ids) { CertificateIds.Add(id); } } _logger.LogInformation($"Seagoing Crew Engineering Position details page visited at {DateTime.UtcNow.ToLongTimeString()}"); Position = await _jobpositionService.GetJobPositionById(positionid); Level = Position.JobGroupLevelId; GroupId = Position.JobGroupId; PositionCertificates = await _jobpositionService.GetJobCertificatesById(positionid); var CompetencyTypes = await _jobpositionService.GetAllJobCompetencyTypes(); foreach (var competencytype in CompetencyTypes) { var competencies = await _jobpositionService.GetJobCompetencyRatingsByTypeId(positionid, competencytype.Id); if (!competencies.Equals(null)) { PositionCompetencyRatings.Add(competencies); } } RouteParameter = String.Format($"jobPositionId={positionid}&jobGroupLevelId={Position.JobGroupLevelId}&jobGroupId={Position.JobGroupId}"); }
/// <summary> /// Returns true if InputCredentialsInfo instances are equal /// </summary> /// <param name="other">Instance of InputCredentialsInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(InputCredentialsInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CredentialID == other.CredentialID || CredentialID != null && CredentialID.Equals(other.CredentialID) ) && ( Certificates == other.Certificates || Certificates != null && Certificates.Equals(other.Certificates) ) && ( CertInfo == other.CertInfo || CertInfo != null && CertInfo.Equals(other.CertInfo) ) && ( AuthInfo == other.AuthInfo || AuthInfo != null && AuthInfo.Equals(other.AuthInfo) ) && ( Lang == other.Lang || Lang != null && Lang.Equals(other.Lang) ) && ( ClientData == other.ClientData || ClientData != null && ClientData.Equals(other.ClientData) )); }
public async Task OnGetAsync(int positionid) { _logger.LogInformation($"Similar Position Search page visited at {DateTime.UtcNow.ToLongTimeString()}"); if (!SameLevels.Equals(string.Empty)) { var ids = SameLevels.Split("&sameLevelCompetencyId="); foreach (var id in ids) { SameLevelCompetencyIds.Add(id); } } if (!HigherLevels.Equals(string.Empty)) { var ids = HigherLevels.Split("&higherLevelCompetencyId="); foreach (var id in ids) { HigherLevelCompetencyIds.Add(id); } } if (!SameOrHigherLevels.Equals(string.Empty)) { var ids = SameOrHigherLevels.Split("&sameOrHigherLevelCompetencyId="); foreach (var id in ids) { HigherLevelCompetencyIds.Add(id); SameLevelCompetencyIds.Add(id); } } if (!Certificates.Equals(string.Empty)) { var ids = Certificates.Split("&certificateId="); foreach (var id in ids) { CertificateIds.Add(id); } } if (!RequiredCompetencies.Equals(string.Empty)) { var ids = RequiredCompetencies.Split("&requiredCompetencyId="); foreach (var id in ids) { RequiredCompetencyIds.Add(id); } } foreach (var added in AddedCompetencies.Split("&addedCompetencyId=")) { if (!string.IsNullOrEmpty(added)) { int number; bool success = Int32.TryParse(added, out number); if (success) { AddedCompetencyValues.Add(number); } } } Position = await _jobpositionService.GetJobPositionById(positionid); PositionCertificates = await _jobpositionService.GetJobCertificatesById(positionid); var CompetencyTypes = await _jobpositionService.GetAllJobCompetencyTypes(); foreach (var competencytype in CompetencyTypes) { var competencies = await _jobpositionService.GetJobCompetencyRatingsByTypeId(positionid, competencytype.Id); if (!competencies.Equals(null)) { PositionCompetencyRatings.Add(competencies); } } }