public async Task <IActionResult> Edit(int id, [Bind("Id,MatchId,RefereeId,RefereeId1,RefereeId2,RefereeId3,REF1Fee,REF1Allowance,REF1LateGame,REF1TravellengthKm,REF1TravelKostperkm,REF1TravelKost,REF1Toll,REF1ParkingFee,REF1TotalPayment,REF1Paid,REF1Date,REF1Sign,REF1From,REF1To,REF2Fee,REF2Allowance,REF2LateGame,REF2TravellengthKm,REF2TravelKostperkm,REF2TravelKost,REF2Toll,REF2ParkingFee,REF2TotalPayment,REF2Paid,REF2Date,REF2Sign,REF2From,REF2To,REF3Fee,REF3Allowance,REF3LateGame,REF3TravellengthKm,REF3TravelKostperkm,REF3TravelKost,REF3Toll,REF3ParkingFee,REF3TotalPayment,REF3Paid,REF3Date,REF3Sign,REF3From,REF3To,REF4Fee,REF4Allowance,REF4LateGame,REF4TravellengthKm,REF4TravelKostperkm,REF4TravelKost,REF4Toll,REF4ParkingFee,REF4TotalPayment,REF4Paid,REF4Date,REF4Sign,REF4From,REF4To")] RefReceipt refReceipt) { if (id != refReceipt.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(refReceipt); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RefReceiptExists(refReceipt.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["MatchId"] = new SelectList(_context.Match, "Id", "MatchString", refReceipt.MatchId); ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "FullName", refReceipt.RefereeId); ViewData["RefereeId1"] = new SelectList(_context.Referee, "Id", "FullName", refReceipt.RefereeId1); ViewData["RefereeId2"] = new SelectList(_context.Referee, "Id", "FullName", refReceipt.RefereeId2); ViewData["RefereeId3"] = new SelectList(_context.Referee, "Id", "FullName", refReceipt.RefereeId3); return(View(refReceipt)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,TournamentName")] 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,FirstName,LastName,StreetAddress,ZipCode,City,Country,PhoneNumber1,PhoneNumber2,Email,RefereeTypeId")] 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))); } ViewData["RefereeTypeId"] = new SelectList(_context.RefreeType, "Id", "RefereeTypeName", referee.RefereeTypeId); return(View(referee)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,GameCategoryName")] GameCategory gameCategory) { if (id != gameCategory.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(gameCategory); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GameCategoryExists(gameCategory.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(gameCategory)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,StreetAddress,ZipCode,City,Country,PhoneNumber1,PhoneNumber2,Email,PersonTypeId,CompanyId,PlayerPossition,SSN")] 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))); } ViewData["CompanyId"] = new SelectList(_context.Company, "Id", "CompanyName", person.CompanyId); ViewData["PersonTypeId"] = new SelectList(_context.Set <PersonType>(), "Id", "PersonTypeName", person.PersonTypeId); return(View(person)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,WorkingDayName,WorkingDayStart,WorkingDayEnd,HoursWorked")] WorkingDay workingDay) { if (id != workingDay.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(workingDay); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WorkingDayExists(workingDay.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(workingDay)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,PersonTypeName")] PersonType personType) { if (id != personType.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(personType); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonTypeExists(personType.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(personType)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,TeamId,PersonId,PersonId1,PersonId2,PersonId3,PersonId4,PersonId5,PersonId6,PersonId7,PersonId8,PersonId9,PersonId10,PersonId11,PersonId12,PersonId13,PersonId14,PersonId15,PersonId16,PersonId17,PersonId18,PersonId19,PersonId20,PersonId21,PersonId22,PersonId23,PersonId24")] TeamList teamList) { if (id != teamList.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(teamList); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TeamListExists(teamList.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "FullName", teamList.PersonId1); ViewData["PersonId5"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId5); ViewData["PersonId6"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId6); ViewData["PersonId7"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId7); ViewData["PersonId8"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId8); ViewData["PersonId9"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId9); ViewData["PersonId10"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId10); ViewData["PersonId11"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId11); ViewData["PersonId12"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId12); ViewData["PersonId3"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId3); ViewData["PersonId4"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId4); ViewData["PersonId"] = new SelectList(_context.Person, "Id", "FullName", teamList.PersonId); ViewData["PersonId13"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId13); ViewData["PersonId22"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId22); ViewData["PersonId23"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId23); ViewData["PersonId24"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId24); ViewData["PersonId14"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId14); ViewData["PersonId15"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId15); ViewData["PersonId16"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId16); ViewData["PersonId17"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId17); ViewData["PersonId18"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId18); ViewData["PersonId19"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId19); ViewData["PersonId20"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId20); ViewData["PersonId21"] = new SelectList(_context.Person, "Id", "PlayerString", teamList.PersonId21); ViewData["TeamId"] = new SelectList(_context.Team, "Id", "TeamName", teamList.TeamId); ViewData["PersonId2"] = new SelectList(_context.Person, "Id", "FullName", teamList.PersonId2); return(View(teamList)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,TSMNumber,GameCategoryId,GameNumber,GameDateTime,ArenaId,TeamId,TeamId1,HomeTeamScore,AwayTeamScore,RefereeId,RefereeId1,RefereeId2,RefereeId3,Played,Payed,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", "ArenaName", match.ArenaId); ViewData["TeamId1"] = new SelectList(_context.Team, "Id", "TeamName", match.TeamId1); ViewData["GameCategoryId"] = new SelectList(_context.GameCategory, "Id", "GameCategoryName", match.GameCategoryId); ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "FullName", match.RefereeId); ViewData["RefereeId1"] = new SelectList(_context.Referee, "Id", "FullName", match.RefereeId1); ViewData["TeamId"] = new SelectList(_context.Team, "Id", "TeamName", match.TeamId); ViewData["RefereeId2"] = new SelectList(_context.Referee, "Id", "FullName", match.RefereeId2); ViewData["RefereeId3"] = new SelectList(_context.Referee, "Id", "FullName", match.RefereeId3); ViewData["TournamentId"] = new SelectList(_context.Tournament, "Id", "TournamentName", match.TournamentId); return(View(match)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,GameCategoryId,GameNumber,GameDateTime,ArenaId,TeamId,TeamId1,HomeTeamScore,AwayTeamScore,PersonId,PersonId1,PersonId2,PersonId3,HD1Fee,HD1TravelKost,HD1Alowens,HD1LateGameKost,HD1TotalFee,HD2Fee,HD2TravelKost,HD2Alowens,HD2LateGameKost,HD2TotalFee,LD1Fee,LD1TravelKost,LD1Alowens,LD1LateGameKost,LD1TotalFee,LD2Fee,LD2TravelKost,LD2Alowens,LD2LateGameKost,LD2TotalFee,GameTotalKost")] 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))); } ViewData["ArenaId"] = new SelectList(_context.Arena, "Id", "ArenaName", game.ArenaId); ViewData["TeamId1"] = new SelectList(_context.Team, "Id", "TeamName", game.TeamId1); ViewData["GameCategoryId"] = new SelectList(_context.GameCategory, "Id", "GameCategoryName", game.GameCategoryId); ViewData["PersonId"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId); ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId1); ViewData["TeamId"] = new SelectList(_context.Team, "Id", "TeamName", game.TeamId); ViewData["PersonId2"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId2); ViewData["PersonId3"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId3); return(View(game)); }
public async Task <IActionResult> Edit(int id, [Bind("Id,ScheduleStartDate,ScheduleEndDate,ScheduleWeek,ScheduleName,ScheduleDescription,PersonId,WorkingDayId,WorkingDayId1,WorkingDayId2,WorkingDayId3,WorkingDayId4,TotalWorkedHours")] Schedule schedule) { if (id != schedule.Id) { return(NotFound()); } if (ModelState.IsValid) { try { var pROPlannerContext = _context.Schedule.Include(s => s.Person).Include(s => s.WorkingDay).Include(s => s.WorkingDay1).Include(s => s.WorkingDay3).Include(s => s.WorkingDay4).Include(s => s.WorkingDay5); _context.Update(schedule); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ScheduleExists(schedule.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["PersonId"] = new SelectList(_context.Person, "Id", "FirstName", schedule.PersonId); ViewData["WorkingDayId"] = new SelectList(_context.WorkingDay, "Id", "WorkingDayTimes", schedule.WorkingDayId); ViewData["WorkingDayId1"] = new SelectList(_context.WorkingDay, "Id", "WorkingDayTimes", schedule.WorkingDayId1); ViewData["WorkingDayId2"] = new SelectList(_context.WorkingDay, "Id", "WorkingDayTimes", schedule.WorkingDayId2); ViewData["WorkingDayId3"] = new SelectList(_context.WorkingDay, "Id", "WorkingDayTimes", schedule.WorkingDayId3); ViewData["WorkingDayId4"] = new SelectList(_context.WorkingDay, "Id", "WorkingDayTimes", schedule.WorkingDayId4); return(View(schedule)); }