public async Task <IActionResult> OnGetAsync(string system, string studentRef, string academicYear, int offeringID, int?offeringGroupID, string notes) { string systemDB = DatabaseSelector.GetDatabase(_configuration, system); SystemID = systemDB; SystemILPID = ""; NoProgressionRoute = new NoProgressionRoute { SystemDatabase = system, StudentRef = studentRef, AcademicYear = academicYear, OfferingID = offeringID, OfferingGroupID = offeringGroupID, Notes = notes, }; //if (studentRef == null || offeringID <= 0) //{ // return NotFound(); //} UserDetails = await Identity.GetFullName(system, academicYear, User.Identity.Name.Split('\\').Last(), _context, _configuration); return(Page()); }
public async Task <IActionResult> OnGetAsync(string id) { if (id == null) { return(NotFound()); } NoProgressionRoute = await _context.NoProgressionRoute.FirstOrDefaultAsync(m => m.StudentRef == id); if (NoProgressionRoute == null) { return(NotFound()); } return(Page()); }
public async Task <IActionResult> OnPostAsync(string id) { if (id == null) { return(NotFound()); } NoProgressionRoute = await _context.NoProgressionRoute_1.FindAsync(id); if (NoProgressionRoute != null) { _context.NoProgressionRoute.Remove(NoProgressionRoute); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }