예제 #1
0
 static private KeySkillStats GetSkillWithStats(Key_Skills skill, List <HHVacancyModel> vacanciesHasSkill, int allVacanciesCnt)
 {
     return(new KeySkillStats()
     {
         KeySkill = skill,
         Price = SalaryInfo.GetAverageSalary(vacanciesHasSkill),
         FrequencyInPercent = decimal.Divide(vacanciesHasSkill.Count, allVacanciesCnt) * 100
     });
 }
예제 #2
0
        public decimal GetAverageRegionSalary(int areaId)
        {
            var vacs = _vacancyDataHandlerService.GetRegionVacancies(_vacancyDataHandlerService.GetVacanciesWithSalary(_vacancyService.Vacancies), areaId);

            if (!vacs.Any())
            {
                return(-1);
            }
            return(SalaryInfo.GetAverageSalary(vacs));
        }
예제 #3
0
 public decimal GetAverageSalary([FromServices] IVacancyDataHandlerService service)
 {
     return(SalaryInfo.GetAverageSalary(service.GetVacanciesWithSalary(_vacancyService.Vacancies)));
 }