Exemplo n.º 1
0
        public async Task <IActionResult> SelectEvaluation(Guid investigationId, Guid jobId)
        {
            var investigation = await _investigationManager.FindByIdAsync(investigationId);

            if (investigation == null)
            {
                return(NotFound(investigationId));
            }

            var evaluations = await _evaluationQuerier.GetEvaluationsAsync(jobId);

            var model = new SelectEvaluationViewModel()
            {
                InvestigationId = investigationId,
                Name            = investigation.Name
            };

            model.Evaluations = evaluations
                                .Select(s => new SelectListItem()
            {
                Value = s.Id.ToString(),
                Text  = s.Title
            }).ToList();

            return(View(model));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(Guid id)
        {
            var investigation = await _investigationManager.FindByIdAsync(id);

            if (investigation == null)
            {
                return(NotFound(id));
            }

            var model  = Mapper.Map <EditInvestigationViewModel>(investigation);
            var resume = await _resumeQuerier.GetResumeAsync(investigation.ResumeId);

            model = Mapper.Map(resume, model);
            return(View(model));
        }