public static string GetWorkplacesLabel(int educationLevel)
        {
            DistrictEducationData districtEducationData = JobsUtils.GetEducationData(educationLevel);
            int wp      = GetWorkplacesByLevel(educationLevel);
            var percent = wp == 0 ? " - " :
                          ((int)(districtEducationData.m_finalEligibleWorkers / ((float)wp) * 100)).ToString();

            return(percent + "% (" + districtEducationData.m_finalEligibleWorkers + "/" + wp + ")");
        }
        public static float GetPercent(int educationLevel)
        {
            DistrictEducationData districtEducationData = JobsUtils.GetEducationData(educationLevel);
            int   wp = GetWorkplacesByLevel(educationLevel);
            float percent;

            if (wp == 0)
            {
                percent = districtEducationData.m_finalEligibleWorkers == 0 ? 0 : 1;
            }
            else
            {
                percent = districtEducationData.m_finalEligibleWorkers / (float)wp;
            }
            return(percent);
        }
Ejemplo n.º 3
0
        public static string GetWorkplacesLabel(int educationLevel)
        {
            DistrictEducationData ded = JobsUtils.GetEducationData(educationLevel);
            int    wp = getWorkplacesByLevel(educationLevel);
            string percent;

            if (wp == 0)
            {
                percent = " - ";
            }
            else
            {
                percent = ((int)((float)ded.m_finalEligibleWorkers / ((float)wp) * 100)).ToString();
            }

            return(percent + "% (" + ded.m_finalEligibleWorkers + "/" + wp + ")");
        }