Exemple #1
0
        public IActionResult ProfScreen()
        {
            var classes             = _classroomRepository.GetAllClassrooms().OrderBy(c => c.className);
            var students            = _studentRepository.GetAllStudents().OrderBy(s => s.classId);
            var profScreenViewModel = new ProfScreenViewModel()
            {
                Classrooms = classes.ToList(),
                Students   = students.ToList()
            };

            return(View(profScreenViewModel));
        }
Exemple #2
0
        public async Task <List <ClassroomBM> > GetAllClassrooms(int RowCount, string AppRootPath)
        {
            List <ClassroomBM> result = new List <ClassroomBM>();
            var oClassroom            = await _DBClassroomRepository.GetAllClassrooms(RowCount).ConfigureAwait(false);

            if (oClassroom != null && oClassroom.Count > 0)
            {
                foreach (var item in oClassroom)
                {
                    result.Add(new ClassroomBM
                    {
                        Id          = item.Id,
                        Name        = item.Name,
                        RefId       = item.RefId,
                        Description = item.Description,
                        Scheduler   = item.Scheduler,
                        SubjectId   = item.SubjectId,
                        StandardId  = item.StandardId,
                        Action      = item.Id.ToString(),
                        CreatedOn   = item.CreatedOn,
                        CreatedBy   = item.CreatedBy
                    });
                }
                ;
            }
            return(result);
        }
        public IEnumerable <ClassroomResponseDto> GetAllClassrooms()
        {
            var classrooms = _classroomRepository.GetAllClassrooms();

            return(_mapper.Map <IEnumerable <ClassroomResponseDto> >(classrooms));
        }
Exemple #4
0
        public ViewResult Index()
        {
            var model = _classRepo.GetAllClassrooms();

            return(View(model));
        }