Beispiel #1
0
        public IActionResult New()
        {
            EvaluationDto evaluationDto = new EvaluationDto();

            // get all Department Managers from users
            evaluationDto.DepartmentManagers = _userService.FindBy(u => u.UserType == UserType.DM).Select(u => new SelectListItem
            {
                Text  = u.Email,
                Value = u.Id
            }).ToList();

            // get all seasons
            evaluationDto.Seasons = _seasonService.All().Select(s => new SelectListItem
            {
                Text  = s.Name,
                Value = s.Id.ToString()
            }).ToList();

            return(View("Form", evaluationDto));
        }
Beispiel #2
0
        public JsonResult GetAll()
        {
            var result = _seasonService.All().Select(Mapper.Map <Season, SeasonDto>);

            return(Json(result));
        }