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

            Schedule = await _context.accSchedule.FirstOrDefaultAsync(m => m.IdSchedule == id);

            if (Schedule == null)
            {
                return NotFound();
            }
            return Page();
        }
Esempio n. 2
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Schedule = await _context.accSchedule.FindAsync(id);

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

            return(RedirectToPage("./Index"));
        }
Esempio n. 3
0
 public void SetSchedule(accSchedule value)
 {
     Schedule = value;
 }