コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        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));
        }
コード例 #7
0
        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));
        }
コード例 #8
0
        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));
        }
コード例 #9
0
        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));
        }
コード例 #10
0
        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));
        }
コード例 #11
0
        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));
        }
コード例 #12
0
        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));
        }
コード例 #13
0
        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));
        }
コード例 #14
0
        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());
        }
コード例 #15
0
        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));
        }
コード例 #16
0
        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));
        }
コード例 #17
0
        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));
        }
コード例 #18
0
        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));
        }
コード例 #19
0
        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));
        }
コード例 #20
0
        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));
        }
コード例 #21
0
        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));
        }
コード例 #22
0
        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));
        }