public SelectListItem GetCurriculum(int curriculumId)
        {
            Curriculum     curriculum            = db.Curricula.FirstOrDefault(o => o.Id == curriculumId);
            Student        student               = db.GetFromDatabase <Student>(curriculum.Id);
            SelectListItem curriculum_selectitem = new SelectListItem
            {
                Text  = curriculum.Naam,
                Value = curriculum.Id.ToString()
            };

            return(curriculum_selectitem);
        }
Beispiel #2
0
        public ActionResult Create(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            CurriculumViewModel curriculumViewModel = new CurriculumViewModel {
                CurriculumTemplates = db.GetFromDatabase <CurriculumTemplate>().ToList(),
                StudentId           = (int)id,
                Student             = db.GetFromDatabase <Student>(id)
            };

            return(View(curriculumViewModel));
        }
        // GET: Topics
        public ActionResult Index()
        {
            List<Topic> topicIndexViewModel = new List<Topic>();
            var topics = db.GetFromDatabase<Topic>();
       
            topics.ToList().ForEach(topic =>
            {
                topicIndexViewModel.Add(new Topic()
                {
                    Naam = topic.Naam,
                    Id = topic.Id,
                    Code = topic.Code,
                    Duur = topic.Duur == null ? new Tijdsduur() : topic.Duur.IsDeleted  ? new Tijdsduur() { } : topic.Duur,
                    Werkvorm = topic.Werkvorm.IsDeleted ? new Werkvorm() { } : topic.Werkvorm,
                    Niveau = topic.Niveau == null ? new Niveau() : topic.Niveau.IsDeleted ? new Niveau() { } : topic.Niveau,
                    Certificeringen = topic.Certificeringen.Where(x => !x.IsDeleted).ToList(),
                });
            });

            if (topics == null)
            {
                return HttpNotFound();
            }

            return View(topicIndexViewModel);
        }
 // GET: Certificeringen
 public ActionResult Index()
 {
     return(View(db.GetFromDatabase <Certificering>()));
 }
 // GET: Tag
 public ActionResult Index()
 {
     return(View(db.GetFromDatabase <Tag>()));
 }
 // GET: Tijdsduren
 public ActionResult Index()
 {
     //return View(db.Tijdsduren.ToList());
     return(View(db.GetFromDatabase <Tijdsduur>()));
 }
Beispiel #7
0
 // GET: Curriculum
 public ActionResult Index()
 {
     return(View(db.GetFromDatabase <CurriculumTemplate>()));
 }
Beispiel #8
0
 // GET: Benodigdheden
 public ActionResult Index()
 {
     return(View(db.GetFromDatabase <Benodigdheid>()));
 }
Beispiel #9
0
 // GET: Percipiolink
 public ActionResult Index()
 {
     return(View(db.GetFromDatabase <PercipioLink>()));
 }