Ejemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ApplicationList = await _context.ApplicationList
                              .Include(a => a.Programs).FirstOrDefaultAsync(m => m.ApplicationListID == id);

            if (ApplicationList == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ApplicationList = await _context.ApplicationList
                              .Include(a => a.Programs).FirstOrDefaultAsync(m => m.ApplicationListID == id);

            if (ApplicationList == null)
            {
                return(NotFound());
            }
            ViewData["ProgramsID"] = new SelectList(_context.Programs, "ProgramsID", "ProgramsID");
            return(Page());
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ApplicationList = await _context.ApplicationList.FindAsync(id);

            if (ApplicationList != null)
            {
                _context.ApplicationList.Remove(ApplicationList);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Ejemplo n.º 4
0
        public IActionResult OnGet(int?id, int?sid, string pid)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var sturec = _context.Student.Where(c => c.StudentID == id);

            ApplicationList = _context.ApplicationList.FirstOrDefault(m => m.ApplicationListID == id);

            if (ApplicationList == null)
            {
                return(NotFound());
            }
            ViewData["sid"] = sid;
            ViewData["pid"] = pid;
            return(Page());
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ApplicationList = await _context.ApplicationList
                              .Include(a => a.Programs).FirstOrDefaultAsync(m => m.ApplicationListID == id);

            if (ApplicationList == null)
            {
                return(NotFound());
            }
            var programrec = from p in _context.Programs select p;

            programrec = programrec.Where(c => c.ProgramsID == ApplicationList.ProgramsID);

            PrgName = programrec.FirstOrDefault().ProgramName;
            return(Page());
        }