Beispiel #1
0
        public static EducatorEmploymentItemViewModel Build(EducatorEmployment educatorEmployment)
        {
            var language         = CultureHelper.CurrentLanguage;
            var position         = GetPositionShort(educatorEmployment, language);
            var formatedPosition = Regex.Replace(position, @"[\d-]", string.Empty);

            return(new EducatorEmploymentItemViewModel
            {
                Position = formatedPosition,
                Department = GetSapDepartment(educatorEmployment),
            });
        }
Beispiel #2
0
 private static string GetPositionShort(EducatorEmployment educatorEmployment, LanguageCode language)
 {
     return(educatorEmployment.PositionShort == null ?
            string.Empty :
            educatorEmployment.PositionShort.GetNameByLanguage(language) ?? string.Empty);
 }
Beispiel #3
0
 private static string GetSapDepartment(EducatorEmployment educatorEmployment)
 {
     return(educatorEmployment.SapDepartment == null ?
            string.Empty :
            educatorEmployment.SapDepartment.Name);
 }