예제 #1
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Grade = await _context.Grade
                    .Include(g => g.ApplicationUser)
                    .Include(g => g.Degree)
                    .Include(g => g.GPA)
                    .Include(g => g.Semester)
                    .Include(g => g.SubjectModule).FirstOrDefaultAsync(m => m.GradeID == id);

            if (Grade == null)
            {
                return(NotFound());
            }
            ViewData["StudentID"]       = new SelectList(_context.Set <ApplicationUser>(), "Id", "Id");
            ViewData["DegreeID"]        = new SelectList(_context.Degree, "DegreeID", "DegreeID");
            ViewData["GPAID"]           = new SelectList(_context.GPA, "GPAID", "GPAID");
            ViewData["SemesterID"]      = new SelectList(_context.Set <Semester>(), "SemesterID", "SemesterID");
            ViewData["SubjectModuleID"] = new SelectList(_context.Set <SubjectModule>(), "SubjectModuleID", "SubjectModuleID");
            return(Page());
        }
 public IActionResult OnGet()
 {
     ViewData["SemesterID"] = new SelectList(_context.Semester, "SemesterID", "SemesterID");
     ViewData["StudentID"]  = new SelectList(_context.Set <ApplicationUser>(), "Id", "Id");
     ViewData["YearID"]     = new SelectList(_context.Set <Year>(), "YearID", "YearID");
     return(Page());
 }
예제 #3
0
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SGPA = await _context.SGPA
                   .Include(s => s.Semester)
                   .Include(s => s.User)
                   .Include(s => s.Year).FirstOrDefaultAsync(m => m.SGPAID == id);

            if (SGPA == null)
            {
                return(NotFound());
            }
            ViewData["SemesterID"] = new SelectList(_context.Semester, "SemesterID", "SemesterID");
            ViewData["StudentID"]  = new SelectList(_context.Set <ApplicationUser>(), "Id", "Id");
            ViewData["YearID"]     = new SelectList(_context.Set <Year>(), "YearID", "YearID");
            return(Page());
        }
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Semester = await _context.Semester
                       .Include(s => s.Year).FirstOrDefaultAsync(m => m.SemesterID == id);

            if (Semester == null)
            {
                return(NotFound());
            }
            ViewData["YearID"] = new SelectList(_context.Set <Year>(), "YearID", "YearID");
            return(Page());
        }
        public async Task <IActionResult> OnGetAsync(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SubjectModule = await _context.SubjectModule
                            .Include(s => s.Degree).FirstOrDefaultAsync(m => m.SubjectModuleID == id);

            if (SubjectModule == null)
            {
                return(NotFound());
            }
            ViewData["DegreeID"] = new SelectList(_context.Set <Degree>(), "DegreeID", "DegreeID");
            return(Page());
        }
 public IActionResult OnGet()
 {
     ViewData["DegreeID"] = new SelectList(_context.Set <Degree>(), "DegreeID", "DegreeID");
     return(Page());
 }
 public IActionResult OnGet()
 {
     ViewData["YearID"] = new SelectList(_context.Set <Year>(), "YearID", "YearID");
     return(Page());
 }