Exemplo n.º 1
0
        // GET: Student
        public virtual async Task <ActionResult> Index()
        {
            ViewBag.Subjects = await SubjectCore.GetAllAsync().ConfigureAwait(false);

            ViewBag.Student = await StudentCore.GetAllAsync().ConfigureAwait(false);

            var students = await StudentCore.GetAllAsync(new[] {
                nameof(Student.Subjects)
            }).ConfigureAwait(false);

            return(View(students));
        }
Exemplo n.º 2
0
        public virtual async Task <ActionResult> Filter(Guid?SubjectId)
        {
            ViewBag.Subject = await SubjectCore.GetAllAsync().ConfigureAwait(false);

            ViewBag.AllStudents = await StudentCore.GetAllAsync().ConfigureAwait(false);

            var model = await SubjectCore.GetFiltered(navigationProperties : new[] {
                nameof(Subject.Students)
            }).ConfigureAwait(false);

            if (model == null)
            {
                return(View());
            }
            if (SubjectId != null && SubjectId != Guid.Empty)
            {
                ViewBag.ShiftIdToOpenInDialog = SubjectId.Value;
            }

            ViewBag.SubjectList      = model.EntityContainers.First().Data;
            ViewBag.TotalShiftsCount = model.TotalItems;
            return(View(model));
        }
Exemplo n.º 3
0
        // GET: Subject
        public virtual async Task <ActionResult> Index()
        {
            var subjects = await SubjectCore.GetAllAsync().ConfigureAwait(false);

            return(View(subjects));
        }