Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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"));
        }