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

            Payroll = await _context.Payroll
                      .Include(p => p.Employee).SingleOrDefaultAsync(m => m.PayrollId == id);

            if (Payroll == null)
            {
                return(NotFound());
            }
            ViewData["EmployeeId"] = new SelectList(_context.Set <Employee>(), "EmployeeId", "EmployeeId");
            return(Page());
        }
예제 #2
0
 public IActionResult OnGet()
 {
     ViewData["EmployeeId"] = new SelectList(_context.Set <Employee>(), "EmployeeId", "EmployeeId");
     return(Page());
 }