Beispiel #1
0
        public ActionResult RequestSupervision(Guid id)
        {
            var thesis = Db.Theses.SingleOrDefault(x => x.Id == id);


            var model = new ThesisSupervisionModel
            {
                Thesis      = thesis,
                OrganiserId = thesis.Student.Curriculum.Organiser.Id
            };


            // Liste aller Fakultäten
            // nur die eigene

            /*
             * ViewBag.Organiser = Db.Organisers.Where(x => x.Id == thesis.Student.Curriculum.Organiser.Id).OrderBy(x => x.ShortName).Select(c => new SelectListItem
             * {
             *  Text = c.ShortName,
             *  Value = c.Id.ToString(),
             * });
             */

            ViewBag.Organiser = Db.Organisers.Where(x => x.IsFaculty && !x.IsStudent).OrderBy(x => x.ShortName).Select(c => new SelectListItem
            {
                Text  = c.ShortName,
                Value = c.Id.ToString(),
            });


            return(View(model));
        }
        public ActionResult AddSupervisors(Guid id)
        {
            var thesis = Db.Theses.SingleOrDefault(x => x.Id == id);


            var model = new ThesisSupervisionModel
            {
                Thesis      = thesis,
                OrganiserId = thesis.Student.Curriculum.Organiser.Id
            };


            // Liste aller Fakultäten
            ViewBag.Organiser = Db.Organisers.Where(x => x.Id == thesis.Student.Curriculum.Organiser.Id).OrderBy(x => x.ShortName).Select(c => new SelectListItem
            {
                Text  = c.ShortName,
                Value = c.Id.ToString(),
            });



            return(View(model));
        }