public async Task <IActionResult> Create([Bind("Id,ArenaName,ArenaStreetAddress,ArenaZipCode,ArenaCounty,ArenaCountry")] Arena arena) { if (ModelState.IsValid) { _context.Add(arena); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(arena)); }
public async Task <IActionResult> Create([Bind("Id,TournamentPhaseName")] TournamentPhase tournamentPhase) { if (ModelState.IsValid) { _context.Add(tournamentPhase); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tournamentPhase)); }
public async Task <IActionResult> Create([Bind("Id,ClubName,StreetAddress,ZipCode,County,Country,PhoneNumber,Email")] Club club) { if (ModelState.IsValid) { _context.Add(club); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(club)); }
public async Task <IActionResult> Create([Bind("Id,CountryName")] Country country) { if (ModelState.IsValid) { _context.Add(country); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(country)); }
public async Task <IActionResult> Create([Bind("Id,MatchLengthName")] MatchLength matchLength) { if (ModelState.IsValid) { _context.Add(matchLength); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(matchLength)); }
public async Task <IActionResult> Create([Bind("Id,RefereeLevelName")] RefereeLevel refereeLevel) { if (ModelState.IsValid) { _context.Add(refereeLevel); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(refereeLevel)); }
public async Task <IActionResult> Create([Bind("Id,GameStatusName")] GameStatus gameStatus) { if (ModelState.IsValid) { _context.Add(gameStatus); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(gameStatus)); }
public async Task <IActionResult> Create([Bind("Id,TeamRegisterName")] TeamRegister teamRegister) { if (ModelState.IsValid) { _context.Add(teamRegister); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(teamRegister)); }
public async Task <IActionResult> Create([Bind("Id,TableSystemName")] TableSystem tableSystem) { if (ModelState.IsValid) { _context.Add(tableSystem); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tableSystem)); }
public async Task <IActionResult> Create([Bind("Id,SeriesName,StartDate,EndDate")] Series series) { if (ModelState.IsValid) { _context.Add(series); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(series)); }
public async Task <IActionResult> Create([Bind("Id,Status")] Staff staff) { if (ModelState.IsValid) { _context.Add(staff); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(staff)); }
public async Task <IActionResult> Create([Bind("Id,LocationName")] Location location) { if (ModelState.IsValid) { _context.Add(location); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(location)); }
public async Task <IActionResult> Create([Bind("Id,SportName,KcalPerHour")] Sport sport) { if (ModelState.IsValid) { _context.Add(sport); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sport)); }
public async Task <IActionResult> Create([Bind("Id,SportId,LocationId,Distance,StartDateTime,EndDateTime,Duration")] Workout workout) { if (ModelState.IsValid) { _context.Add(workout); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["LocationId"] = new SelectList(_context.Location, "Id", "LocationName"); ViewData["SportId"] = new SelectList(_context.Sport, "Id", "SportName"); return(View()); }
public async Task <IActionResult> Create([Bind("Id,TeamName,PersonId,PersonId1,PersonId2")] Team team) { if (ModelState.IsValid) { _context.Add(team); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PersonId1"] = new SelectList(_context.Set <Person>(), "Id", "Id", team.PersonId1); ViewData["PersonId2"] = new SelectList(_context.Set <Person>(), "Id", "Id", team.PersonId2); ViewData["PersonId"] = new SelectList(_context.Set <Person>(), "Id", "Id", team.PersonId); return(View(team)); }
public async Task <IActionResult> Create([Bind("Id,SeriesId,MatchLengthId,RefereeTypeId,FeeValue")] RefereeFee refereeFee) { if (ModelState.IsValid) { _context.Add(refereeFee); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["MatchLengthId"] = new SelectList(_context.MatchLength, "Id", "MatchLengthName", refereeFee.MatchLengthId); ViewData["RefereeTypeId"] = new SelectList(_context.RefereeType, "Id", "RefereeTypeName", refereeFee.RefereeTypeId); ViewData["SeriesId"] = new SelectList(_context.Series, "Id", "SeriesName", refereeFee.SeriesId); return(View(refereeFee)); }
public async Task <IActionResult> Create([Bind("Id,GameId,PersonId,PersonId1,PersonId2,PersonId3,FeeHD1,AlowenceHD1,TravelDistanceHD1,TravelCostHD1,LateMatchStartHD1,TotalPaymentHD1,FeeHD2,AlowenceHD2,TravelDistanceHD2,TravelCostHD2,LateMatchStartHD2,TotalPaymentHD2,FeeLD1,AlowenceLD1,TravelDistanceLD1,TravelCostLD1,LateMatchStartLD1,TotalPaymentLD1,FeeLD2,AlowenceLD2,TravelDistanceLD2,TravelCostLD2,LateMatchStartLD2,TotalPaymentLD2")] PaymentPost paymentPost) { if (ModelState.IsValid) { _context.Add(paymentPost); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["GameId"] = new SelectList(_context.Game, "Id", "GameName", paymentPost.GameId); ViewData["PersonId"] = new SelectList(_context.Person, "Id", "FullName", paymentPost.PersonId); ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "FullName", paymentPost.PersonId1); ViewData["PersonId2"] = new SelectList(_context.Person, "Id", "FullName", paymentPost.PersonId2); ViewData["PersonId3"] = new SelectList(_context.Person, "Id", "FullName", paymentPost.PersonId3); return(View(paymentPost)); }
public async Task <IActionResult> Create([Bind("Id,StartDate,EndDate,ShowCaseName,ArenaId,SeriesId,ArenaId1,PersonId,PersonId1,PersonId2,PersonId3,PersonId4,PersonId5")] ShowCase showCase) { if (ModelState.IsValid) { _context.Add(showCase); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["SeriesId"] = new SelectList(_context.Series, "Id", "SeriesName", showCase.SeriesId); ViewData["ArenaId"] = new SelectList(_context.Arena, "Id", "ArenaName", showCase.ArenaId); ViewData["PersonId"] = new SelectList(_context.Set <Person>(), "Id", "FullName", showCase.PersonId); ViewData["PersonId1"] = new SelectList(_context.Set <Person>(), "Id", "FullName", showCase.PersonId1); ViewData["PersonId2"] = new SelectList(_context.Set <Person>(), "Id", "FullName", showCase.PersonId2); ViewData["PersonId3"] = new SelectList(_context.Set <Person>(), "Id", "FullName", showCase.PersonId3); ViewData["PersonId5"] = new SelectList(_context.Set <Person>(), "Id", "FullName", showCase.PersonId5); ViewData["ArenaId1"] = new SelectList(_context.Arena, "Id", "LocationString", showCase.ArenaId1); ViewData["PersonId4"] = new SelectList(_context.Set <Person>(), "Id", "FullName", showCase.PersonId4); return(View(showCase)); }
public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,StreetAddress,ZipCode,County,Country,Ssn,PhoneNumber,Email,ClubId,RefereeNumber,RefereeTypeId,RefereeCategoryId,RefereeCategoryTypeId,RefereeDistrictId,RefereeId,CoachId,PlayerId,StaffId")] Person person) { if (ModelState.IsValid) { _context.Add(person); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClubId"] = new SelectList(_context.Club, "Id", "ClubName", person.ClubId); ViewData["CoachId"] = new SelectList(_context.Coach, "Id", "Status", person.CoachId); ViewData["PlayerId"] = new SelectList(_context.Player, "Id", "Status", person.PlayerId); ViewData["RefereeId"] = new SelectList(_context.Referee, "Id", "Status", person.RefereeId); ViewData["RefereeCategoryId"] = new SelectList(_context.RefereeCategory, "Id", "RefereeCategoryName", person.RefereeCategoryId); ViewData["RefereeCategoryTypeId"] = new SelectList(_context.RefereeCategoryType, "Id", "RefereeCategoryTypeName", person.RefereeCategoryTypeId); ViewData["RefereeDistrictId"] = new SelectList(_context.RefereeDistrict, "Id", "RefereeDistrictName", person.RefereeDistrictId); ViewData["RefereeTypeId"] = new SelectList(_context.RefereeType, "Id", "RefereeTypeName", person.RefereeTypeId); ViewData["StaffId"] = new SelectList(_context.Staff, "Id", "Status", person.StaffId); return(View(person)); }
public async Task <IActionResult> Create([Bind("Id,MatchNumber,MatchDateTime,ArenaId,TeamId,TeamId1,HomeTeamScore,AwayTeamScore,PersonId,PersonId1,PersonId2,PersonId3,PersonId4,SeriesId,TSMNumber")] Game game) { if (ModelState.IsValid) { _context.Add(game); await _context.SaveChangesAsync(); 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["TeamId"] = new SelectList(_context.Team, "Id", "TeamName", game.TeamId); ViewData["PersonId"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId); ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId1); ViewData["PersonId2"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId2); ViewData["PersonId3"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId3); ViewData["PersonId4"] = new SelectList(_context.Person, "Id", "FullName", game.PersonId4); ViewData["SeriesId"] = new SelectList(_context.Series, "Id", "SeriesName", game.SeriesId); return(View(game)); }
public async Task <IActionResult> Create([Bind("Id,MatchNumber,MatchDateTime,ArenaId,TeamId,TeamId1,HomeTeamScore,AwayTeamScore,PersonId,PersonId1,PersonId2,PersonId3,PersonId4,SeriesId,TSMNumber,Payment,Payed,GameStatusId")] PROGames2014 pROGames2014) { if (ModelState.IsValid) { _context.Add(pROGames2014); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ArenaId"] = new SelectList(_context.Arena, "Id", "Id", pROGames2014.ArenaId); ViewData["TeamId1"] = new SelectList(_context.Team, "Id", "Id", pROGames2014.TeamId1); ViewData["GameStatusId"] = new SelectList(_context.GameStatus, "Id", "Id", pROGames2014.GameStatusId); ViewData["TeamId"] = new SelectList(_context.Team, "Id", "Id", pROGames2014.TeamId); ViewData["PersonId"] = new SelectList(_context.Person, "Id", "Id", pROGames2014.PersonId); ViewData["PersonId1"] = new SelectList(_context.Person, "Id", "Id", pROGames2014.PersonId1); ViewData["PersonId2"] = new SelectList(_context.Person, "Id", "Id", pROGames2014.PersonId2); ViewData["PersonId3"] = new SelectList(_context.Person, "Id", "Id", pROGames2014.PersonId3); ViewData["PersonId4"] = new SelectList(_context.Person, "Id", "Id", pROGames2014.PersonId4); ViewData["SeriesId"] = new SelectList(_context.Series, "Id", "Id", pROGames2014.SeriesId); return(View(pROGames2014)); }
public async Task <IActionResult> Create([Bind("Id,RefereeDistrictId,TournamentName,TournamentPhaseId,SeriesNumber,SeriesId,MatchLengthId,MatchReportingId,TableSystemId,RefereeLevelId,TeamNotificationId,TeamRegistrationId,TeamOfficialId,MatchTimeId")] Tournament tournament) { if (ModelState.IsValid) { _context.Add(tournament); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["RefereeDistrictId"] = new SelectList(_context.RefereeDistrict, "Id", "Id", tournament.RefereeDistrictId); ViewData["MatchLengthId"] = new SelectList(_context.MatchLength, "Id", "Id", tournament.MatchLengthId); ViewData["MatchReportingId"] = new SelectList(_context.MatchReporting, "Id", "Id", tournament.MatchReportingId); ViewData["MatchTimeId"] = new SelectList(_context.MatchTime, "Id", "Id", tournament.MatchTimeId); ViewData["RefereeLevelId"] = new SelectList(_context.RefereeLevel, "Id", "Id", tournament.RefereeLevelId); ViewData["SeriesId"] = new SelectList(_context.Series, "Id", "Id", tournament.SeriesId); ViewData["TableSystemId"] = new SelectList(_context.TableSystem, "Id", "Id", tournament.TableSystemId); ViewData["TeamNotificationId"] = new SelectList(_context.TeamNotification, "Id", "Id", tournament.TeamNotificationId); ViewData["TeamOfficialId"] = new SelectList(_context.TeamOfficial, "Id", "Id", tournament.TeamOfficialId); ViewData["TeamRegistrationId"] = new SelectList(_context.TeamRegistration, "Id", "Id", tournament.TeamRegistrationId); ViewData["TournamentPhaseId"] = new SelectList(_context.TournamentPhase, "Id", "Id", tournament.TournamentPhaseId); return(View(tournament)); }