public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,StreetAddress,ZipCode,City,PhoneNumber,Email,RefNumber")] Referee referee) { if (id != referee.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(referee); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RefereeExists(referee.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(referee)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,RefNumber,BirthDate,RefType,Category,CategoryType,Distrikt,Club,StreetAddress,Zipcode,County,Phone1,Phone2,Email,Registred,Created,Payed")] Domarlista domarlista) { if (id != domarlista.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(domarlista); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DomarlistaExists(domarlista.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(domarlista)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Address,ContactName,Phonenumber,Email")] Team team) { if (id != team.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(team); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TeamExists(team.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(team)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,MatchNumber,GameDate,Score1,Score2")] Match match) { if (id != match.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(match); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchExists(match.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(match)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Name,Amount")] Fee fee) { if (id != fee.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(fee); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FeeExists(fee.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(fee)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,MatchNumber,GameDate,Arena,Team1,Team2,Score1,Score2,Ref1,Ref2,Ref3,Ref4,Fee1,Fee2,Fee3,Fee4")] Game game) { if (id != game.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(game); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GameExists(game.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(game)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,RefNumber,BirthDate,StaffType,StreetAddress,Zipcode,County,Phone1,Phone2,Email")] Person person) { if (id != person.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(person); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonExists(person.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(person)); }