Ejemplo n.º 1
0
        private List <StudyGroupSimpleItemDto> MapStudyGroups(List <StudyGroupAcademicSubject> studyGroupAcademicSubjects)
        {
            var studyGroupDtos = new List <StudyGroupSimpleItemDto>();

            if (!studyGroupAcademicSubjects.IsNullOrEmpty())
            {
                var studyGroups = studyGroupAcademicSubjects.Select(select => select.StudyGroup);
                foreach (var studyGroup in studyGroups)
                {
                    var studyGroupDto = new StudyGroupSimpleItemDto();
                    studyGroupDto.Name = studyGroup.Name;
                    studyGroupDto.Id   = studyGroup.Id;
                    studyGroupDtos.Add(studyGroupDto);
                }
            }
            return(studyGroupDtos);
        }
Ejemplo n.º 2
0
        private List <StudyGroupSimpleItemDto> MapStudyGroups(List <TeacherStudyGroup> teacherStudyGroups)
        {
            var studyGroupDtos = new List <StudyGroupSimpleItemDto>();

            if (!teacherStudyGroups.IsNullOrEmpty())
            {
                var studyGroups = teacherStudyGroups.Select(teacherStudyGroup => teacherStudyGroup.StudyGroup);
                foreach (var studyGroup in studyGroups)
                {
                    var studyGroupDto = new StudyGroupSimpleItemDto();
                    studyGroupDto.Name = studyGroup.Name;
                    studyGroupDto.Id   = studyGroup.Id;
                    studyGroupDtos.Add(studyGroupDto);
                }
            }
            return(studyGroupDtos);
        }
Ejemplo n.º 3
0
 public CreateHomeWorkViewModel()
 {
     Input      = new CreateHomeWorkInput();
     Subject    = new AcademicSubjectSimpleItemDto();
     StudyGroup = new StudyGroupSimpleItemDto();
 }