Exemple #1
0
        public async Task OnGetAsync(int objectiveid)
        {
            _logger.LogInformation($"Position details page visited at {DateTime.UtcNow.ToLongTimeString()}");
            Position = await _jobpositionService.GetJobPositionById(objectiveid);

            LevelObj             = Position.JobLevelId.ToString();
            PositionCertificates = await _jobpositionService.GetJobCertificatesById(objectiveid);

            var CompetencyTypes = await _jobpositionService.GetAllJobCompetencyTypes();

            foreach (var competencytype in CompetencyTypes)
            {
                var competencies = await _jobpositionService.GetJobCompetencyRatingsByTypeId(objectiveid, competencytype.Id);

                if (!competencies.Equals(null))
                {
                    PositionCompetencyRatings.Add(competencies);
                }
            }
        }
Exemple #2
0
        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);
                    }
                }
            }
        }
Exemple #3
0
        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);
                }
            }
        }