//GET: Create public async Task <IActionResult> Create(int?ispitID, int?kandidatID) { if ((kandidatID == null) || (ispitID == null)) { return(NotFound()); } var kandidat = await _kandidat.GetKandidat((int)kandidatID); var ispit = await _ispit.GetIspit((int)ispitID); if (kandidat == null || ispit == null) { return(NotFound()); } KandidatsAndExams kandidatsAndExams = new KandidatsAndExams() { Kandidat = kandidat, Ispit = ispit, Ispits = await _context.Ispit.Select(i => i).ToListAsync(), Roks = await _context.Rok.Where(r => r.ActiveStatus).Select(i => i).ToListAsync(), BrojPolaganja = await _polaganja.GetExamTakeNumber(ispit.Id, kandidat.IdAccaNumber), ExamTakesYTD = await _polaganja.GetExamTakeYTD(kandidat.IdAccaNumber), NewPolaganje = new Polaganja() { IspitId = ispit.Id, KandidatId = kandidat.IdAccaNumber } }; return(View(kandidatsAndExams)); }
// GET: IspitController/Details/5 public ActionResult Details(int id) { var ispit = _ispiti.GetIspit(id); return(View(ispit)); }