public async Task <IActionResult> Edit(int id, [Bind("BusinessName,Title,AltContact,ID,FirstName,LastName,Project,Email,Phone")] Client client) { if (id != client.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(client); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientExists(client.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Edit(int id, [Bind("BuffID,AcademicStanding,ID,FirstName,LastName,Project,Email,Phone")] Member member) { if (id != member.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(member); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MemberExists(member.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(member)); }
public async Task <IActionResult> Edit(int id, [Bind("ProjectID,Title,Description,Activities")] Project project) { if (id != project.ProjectID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(project); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProjectExists(project.ProjectID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(project)); }