// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(ApplicationStatus).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplicationStatusExists(ApplicationStatus.ApplicationStatusId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.QuestionCategory.Add(QuestionCategory); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.ScoreCardField.Add(ScoreCardField); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.ApplicationStatus.Add(ApplicationStatus); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } PitchEvent = await _context.PitchEvents.FindAsync(id); if (PitchEvent != null) { _context.PitchEvents.Remove(PitchEvent); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ApplicationStatus = await _context.ApplicationStatus.FindAsync(id); if (ApplicationStatus != null) { ApplicationStatus.IsArchived = true; _context.ApplicationStatus.Update(ApplicationStatus); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } ScoringCategory = await _context.ScoringCategory.FindAsync(id); if (ScoringCategory != null) { ScoringCategory.IsArchived = true; _context.ScoringCategory.Update(ScoringCategory); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } AddressType = await _context.AddressType.FindAsync(id); if (AddressType != null) { AddressType.IsArchived = true; _context.AddressType.Update(AddressType); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }
public async Task <IActionResult> OnPostAsync(int?id) { if (id == null) { return(NotFound()); } Question = await _context.Question.FindAsync(id); if (Question != null) { Question.IsArchived = true; _context.Question.Update(Question); await _context.SaveChangesAsync(); } return(RedirectToPage("./Index")); }