public void OnPostCompetency(string competencyid) { PageSubmit = true; PageEdit = true; AddedCompetencies += "&addedCompetencyId=" + competencyid; 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); } } } }
public async Task OnGetAsync(int positionid, int objectiveid) { _logger.LogInformation($"Delta page visited at {DateTime.UtcNow.ToLongTimeString()}"); CurrentPosition = await _compareService.GetJobPositionById(positionid); ObjectivePosition = await _compareService.GetJobPositionById(objectiveid); MatchingCertificates = await _compareService.GetMatchingCertificatesByPositionId(positionid, objectiveid); DifferingCertificates = await _compareService.GetDifferingCertificatesByPositionId(positionid, objectiveid); var CompetencyTypes = await _compareService.GetAllJobCompetencyTypes(); foreach (var competencytype in CompetencyTypes) { var matchingcompetencies = await _compareService.GetMatchingCompetenciesByTypeId(competencytype.Id, positionid, objectiveid); if (!matchingcompetencies.Equals(null)) { MatchingCompetencies.Add(matchingcompetencies); } var differingcomptencies = await _compareService.GetDifferingCompetenciesByTypeId(competencytype.Id, positionid, objectiveid); if (!differingcomptencies.Equals(null)) { DifferingCompetencies.Add(differingcomptencies); } } foreach (var added in AddedCompetencies.Split("&addedCompetencyId=")) { if (!string.IsNullOrEmpty(added)) { int number; bool success = Int32.TryParse(added, out number); if (success) { AddedCompetencyId.Add(number); } } } }
public void OnPostDelete(int competencyid) { PageSubmit = true; PageEdit = true; 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); } } } AddedCompetencyValues.Remove(competencyid); AddedCompetencies = string.Empty; foreach (var id in AddedCompetencyValues) { AddedCompetencies += "&addedCompetencyId=" + id.ToString(); } }
public async Task OnPostEdit(int positionid) { Position = await _jobpositionService.GetJobPositionById(positionid); PageSubmit = true; SameLevels = string.Empty; HigherLevels = string.Empty; SameOrHigherLevels = string.Empty; RequiredCompetencies = string.Empty; Certificates = string.Empty; foreach (var c in CertificateIds) { Certificates += "&certificateId=" + c; } foreach (var c in RequiredCompetencyIds) { RequiredCompetencies += "&requiredCompetencyId=" + c; } foreach (var c in SameLevelCompetencyIds) { if (!HigherLevelCompetencyIds.Contains(c)) { SameLevels += "&sameLevelCompetencyId=" + c; } else { SameOrHigherLevels += "&sameOrHigherLevelCompetencyId=" + c; } } foreach (var c in HigherLevelCompetencyIds) { if (!SameLevelCompetencyIds.Contains(c)) { HigherLevels += "&higherLevelCompetencyId=" + c; } } PageSubmit = true; PageEdit = true; Position = await _jobpositionService.GetJobPositionById(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); } } 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); } } } }
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); } } }