public async Task <IActionResult> Edit(int id, [Bind("Id,HockeyMatchId,RefereeId,RefereeFeeId")] RefereeReceipt refereeReceipt) { if (id != refereeReceipt.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(refereeReceipt); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RefereeReceiptExists(refereeReceipt.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["HockeyMatchId"] = new SelectList(_context.Set <HockeyMatch>(), "Id", "Id", refereeReceipt.HockeyMatchId); ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "Id", refereeReceipt.RefereeId); ViewData["RefereeFeeId"] = new SelectList(_context.RefereeFee, "Id", "Id", refereeReceipt.RefereeFeeId); return(View(refereeReceipt)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,ArenaName,StreetAddress,ZipCode,City,Country,EMail,PhoneNumber")] Arena arena) { if (id != arena.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(arena); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ArenaExists(arena.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(arena)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Series,SeriesAgeGroupe,MatchLength,HDFee,LDFee,SeriesCategory")] MatchFee matchFee) { if (id != matchFee.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(matchFee); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MatchFeeExists(matchFee.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(matchFee)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,MatchNumberCupOnline,MatchDescription,MatchDateTime,Arena,HomeTeam,AwayTeam,ScoreHomeTeam,ScoreAwayTeam,Ref1,Ref2,Ref3,Ref4,TournamentId,MatchNumberTSM")] CupOnlineMatch cupOnlineMatch) { if (id != cupOnlineMatch.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(cupOnlineMatch); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CupOnlineMatchExists(cupOnlineMatch.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["TournamentId"] = new SelectList(_context.Set <Tournament>(), "Id", "Id", cupOnlineMatch.TournamentId); return(View(cupOnlineMatch)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,PROMatchNumber,MatchDescription,MatchDateTime,Arena,HomeTeam,AwayTeam,ScoreHomeTeam,ScoreAwayTeam,Ref1,Ref2,Ref3,Ref4,TournamentId,MatchNumberTSM,RefereeId")] PROMatch pROMatch) { if (id != pROMatch.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pROMatch); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PROMatchExists(pROMatch.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "FullName", pROMatch.RefereeId); ViewData["TournamentId"] = new SelectList(_context.Tournament, "Id", "TournamentName", pROMatch.TournamentId); return(View(pROMatch)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,TournamentName,StartDate,EndDate")] Tournament tournament) { if (id != tournament.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tournament); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TournamentExists(tournament.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tournament)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,StartDateTime,EndDateTime,SportId,WorkoutDuration,WorkoutDistance")] PROWorkouts pROWorkouts) { if (id != pROWorkouts.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(pROWorkouts); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PROWorkoutsExists(pROWorkouts.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["SportId"] = new SelectList(_context.Sport, "Id", "Id", pROWorkouts.SportId); return(View(pROWorkouts)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,RefereeFeeName,RefereeFeeCategory,RefereeFeeValue")] RefereeFee refereeFee) { if (id != refereeFee.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(refereeFee); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RefereeFeeExists(refereeFee.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(refereeFee)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,SportName,KcalPerMinute")] Sport sport) { if (id != sport.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sport); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SportExists(sport.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sport)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,MatchDateTime,ArenaId,HockeyMatchId,RefereeId,MatchName,Fee,Alowence,TravelDistance,TravelFee,TravelCost,LateMatchStart,TotalPayment")] Receipt receipt) { if (id != receipt.Id) { return(NotFound()); } if (ModelState.IsValid) { try { receipt.TravelCost = receipt.TravelDistance * receipt.TravelFee; receipt.TotalPayment = receipt.Fee + receipt.Alowence + receipt.TravelCost + receipt.LateMatchStart; _context.Update(receipt); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReceiptExists(receipt.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["ArenaId"] = new SelectList(_context.Set <Arena>(), "Id", "ArenaName", receipt.ArenaId); ViewData["HockeyMatchId"] = new SelectList(_context.Set <HockeyMatch>(), "Id", "MatchName", receipt.HockeyMatchId); ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "FullName", receipt.RefereeId); return(View(receipt)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,Ssn,FirstName,LastName,StreetAddress,City,ZipCode,Country,EMail,RefNumber,PhoneNumber")] 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,Ssn,RefName,NumberOfMatches,NumberOfAsHD,NumberOfAsLD,FeeHD,FeeLD,Fee,TravelKost,LateMatchStart,Alowance,TotalPayment,TournamentId,BankAccountNumber")] PaymentVerification paymentVerification) { if (id != paymentVerification.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(paymentVerification); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PaymentVerificationExists(paymentVerification.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["TournamentId"] = new SelectList(_context.Tournament, "Id", "Id", paymentVerification.TournamentId); return(View(paymentVerification)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,MatchNumber,MatchDateTime,ArenaId,HomeTeamId,AwayTeamId,HomeTeamScore,AwayTeamScore,RefereeId,Referee1Id,Referee2Id,Referee3Id,Referee4Id,TournamentId")] 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))); } ViewData["ArenaId"] = new SelectList(_context.Arena, "Id", "Id", match.ArenaId); ViewData["AwayTeamId"] = new SelectList(_context.Set <AwayTeam>(), "Id", "Id", match.AwayTeamId); ViewData["HomeTeamId"] = new SelectList(_context.Set <HomeTeam>(), "Id", "Id", match.HomeTeamId); ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "Id", match.RefereeId); ViewData["Referee1Id"] = new SelectList(_context.Set <Referee1>(), "Id", "Id", match.Referee1Id); ViewData["Referee2Id"] = new SelectList(_context.Set <Referee2>(), "Id", "Id", match.Referee2Id); ViewData["Referee3Id"] = new SelectList(_context.Set <Referee3>(), "Id", "Id", match.Referee3Id); ViewData["Referee4Id"] = new SelectList(_context.Set <Referee4>(), "Id", "Id", match.Referee4Id); ViewData["TournamentId"] = new SelectList(_context.Tournament, "Id", "Id", match.TournamentId); return(View(match)); }