Пример #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Users = await _context.Users
                    .Include(u => u.UsersRolesID).FirstOrDefaultAsync(m => m.UID == id);

            if (Users == null)
            {
                return(NotFound());
            }
            ViewData["URID"] = new SelectList(_context.Set <UserRoles>(), "URID", "URID");
            return(Page());
        }
Пример #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Employs = await _context.Employs
                      .Include(e => e.Departments)
                      .Include(e => e.UserRolesId).FirstOrDefaultAsync(m => m.EID == id);

            if (Employs == null)
            {
                return(NotFound());
            }
            ViewData["DID"]  = new SelectList(_context.Depts, "DeptID", "DeptID");
            ViewData["URID"] = new SelectList(_context.Set <UserRoles>(), "URID", "URID");
            return(Page());
        }
Пример #3
0
 public IActionResult OnGet()
 {
     ViewData["URID"] = new SelectList(_context.Set <UserRoles>(), "URID", "URID");
     return(Page());
 }