public async Task <ActionResult> Subject(string ID) { if (ID != null) { Subject subject = await Models.Subject.GetInstanceAsync(ID); ViewBag.subject = subject; List <Flow> flows = await Flow.GetCollectionAsync(); ViewBag.flows = flows; List <Person> people = await Person.GetCollectionAsync(); ViewBag.people = people; List <FlowSubject> sFlows = await subject.GetForFlow(); ViewBag.sFlows = sFlows; List <Semester> semesters = await Semester.GetCollectionAsync(); ViewBag.semesters = semesters; return(View("Look")); } else { return(View("~/Views/Shared/Error.cshtml")); } }
public async Task <ActionResult> AddRegistration(string flowSubjectId) { List <Semester> semesters = await Semester.GetCollectionAsync(); ViewBag.semesters = semesters; List <Group> groups = await Group.GetCollectionAsync(); ViewBag.groups = groups; ViewBag.flowSubjectId = flowSubjectId; return(View("AddReg")); }
public async Task <ActionResult> Group(string ID) { if (ID != null) { Group group = await Models.Group.GetInstanceAsync(ID); ViewBag.group = group; List <Semester> semesters = await Semester.GetCollectionAsync(); semesters = semesters.Except(group.Semesters).ToList(); ViewBag.semesters = semesters; return(View("Look")); } else { return(View("~/Views/Shared/Error.cshtml")); } }