Exemple #1
0
        public async Task OnPost(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;
                }
            }
        }
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);
                    }
                }
            }
        }