public async Task <IActionResult> Edit(int id, [Bind("TeamId,TeamName,CoachId,TeamRate,LeagueId")] Team team) { if (id != team.TeamId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(team); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TeamExists(team.TeamId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["LeagueId"] = new SelectList(_context.League, "LeagueId", "LeagueId", team.LeagueId); return(View(team)); }
public async Task <IActionResult> Edit(int id, [Bind("CoachId,CoachName,Rate")] Coach coach) { if (id != coach.CoachId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(coach); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CoachExists(coach.CoachId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["CoachId"] = new SelectList(_context.Team, "TeamId", "TeamId", coach.CoachId); return(View(coach)); }
public async Task <IActionResult> Edit(int id, [Bind("LeagueId,LeaugueName")] League league) { if (id != league.LeagueId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(league); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LeagueExists(league.LeagueId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(league)); }
public async Task <IActionResult> Edit(int id, [Bind("MatchId,Team_homeId,Team_guestId")] Match match) { if (id != match.MatchId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(match); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchExists(match.MatchId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["Team_guestId"] = new SelectList(_context.Team, "TeamId", "TeamId", match.Team_guestId); ViewData["Team_homeId"] = new SelectList(_context.Team, "TeamId", "TeamId", match.Team_homeId); return(View(match)); }
public async Task <IActionResult> Edit([Bind("UserMatchId,MatchId,UserId")] UserMatch userMatch) { if (ModelState.IsValid) { try { _context.Update(userMatch); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!UserMatchExists(userMatch.MatchId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["MatchId"] = new SelectList(_context.Match, "MatchId", "MatchId", userMatch.MatchId); ViewData["UserId"] = new SelectList(_context.User, "UserId", "UserId", userMatch.UserId); return(View(userMatch)); }
public async Task <IActionResult> Edit(int id, [Bind("ScoreStatisticId,Score,Numberofpenalty,NumberofyellowCard,Numberofredcard,MatchId")] ScoreStatistic scoreStatistic) { if (id != scoreStatistic.ScoreStatisticId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(scoreStatistic); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ScoreStatisticExists(scoreStatistic.ScoreStatisticId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["MatchId"] = new SelectList(_context.Match, "MatchId", "MatchId", scoreStatistic.MatchId); return(View(scoreStatistic)); }
public async Task <IActionResult> Edit(int id, [Bind("PlayerId,PlayerName,Offence,Deffence,TeamId")] Player player) { if (id != player.PlayerId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(player); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlayerExists(player.PlayerId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["TeamId"] = new SelectList(_context.Team, "TeamId", "TeamId", player.TeamId); return(View(player)); }
public void Edit(League League) { _context.Update(League); }
public void Edit(Coach Coach) { _context.Update(Coach); }
public void Edit(Match Match) { _context.Update(Match); }
public void Edit(Team player) { _context.Update(player); }
public void Edit(User User) { _context.Update(User); }
public void Edit(Player player) { _context.Update(player); }
public void Edit(ScoreStatistic ScoreStatistic) { _context.Update(ScoreStatistic); }