public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(AssistenciasPRM).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AssistenciasPRMExists(AssistenciasPRM.ID)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } //string emailAddress = String.ToUpper(Request.Form["Formacao.FormacaoNome"].ToString()); _context.Attach(Formacao).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FormacaoExists(Formacao.FormacaoId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.AssistenciasPRMS.Add(AssistenciasPRM); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ToDo = await _context.ToDos.FindAsync(id); if (ToDo != null) { _context.ToDos.Remove(ToDo); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } AssistenciasPRM = await _context.AssistenciasPRMS.FindAsync(id); if (AssistenciasPRM != null) { _context.AssistenciasPRMS.Remove(AssistenciasPRM); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(Guid?id) { if (id == null) { return(NotFound()); } Formacao = await _context.Formacoes.FindAsync(id); if (Formacao != null) { _context.Formacoes.Remove(Formacao); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }