예제 #1
0
        public async Task <IActionResult> Create([Bind("Id,TournamentName")] Tournament tournament)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tournament);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(tournament));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("Id,WorkingDayName,WorkingDayStart,WorkingDayEnd,HoursWorked")] WorkingDay workingDay)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workingDay);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workingDay));
        }
예제 #3
0
        public async Task <IActionResult> Create([Bind("Id,ArenaName")] 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,GameCategoryName")] GameCategory gameCategory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(gameCategory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(gameCategory));
        }
예제 #5
0
        public async Task <IActionResult> Create([Bind("Id,PersonTypeName")] PersonType personType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(personType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(personType));
        }
예제 #6
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,StreetAddress,ZipCode,City,Country,PhoneNumber1,PhoneNumber2,Email,RefereeTypeId")] Referee referee)
        {
            if (ModelState.IsValid)
            {
                _context.Add(referee);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["RefereeTypeId"] = new SelectList(_context.RefreeType, "Id", "RefereeTypeName", referee.RefereeTypeId);
            return(View(referee));
        }
예제 #7
0
        public async Task <IActionResult> Create([Bind("Id,FirstName,LastName,StreetAddress,ZipCode,City,Country,PhoneNumber1,PhoneNumber2,Email,PersonTypeId,CompanyId,PlayerPossition,SSN")] Person person)
        {
            if (ModelState.IsValid)
            {
                _context.Add(person);
                await _context.SaveChangesAsync();

                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));
        }
예제 #8
0
        public async Task <IActionResult> Create([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 (ModelState.IsValid)
            {
                _context.Add(refReceipt);
                await _context.SaveChangesAsync();

                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));
        }
예제 #9
0
        public async Task <IActionResult> Create([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 (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["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));
        }
예제 #10
0
        public async Task <IActionResult> Create([Bind("Id,ScheduleStartDate,ScheduleEndDate,ScheduleWeek,ScheduleName,ScheduleDescription,PersonId,WorkingDayId,WorkingDayId1,WorkingDayId2,WorkingDayId3,WorkingDayId4,TotalWorkedHours")] Schedule schedule)
        {
            if (ModelState.IsValid)
            {
                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.Add(schedule);
                await _context.SaveChangesAsync();

                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));
        }
예제 #11
0
        public async Task <IActionResult> Create([Bind("Id,TSMNumber,GameCategoryId,GameNumber,GameDateTime,ArenaId,TeamId,TeamId1,HomeTeamScore,AwayTeamScore,RefereeId,RefereeId1,RefereeId2,RefereeId3,Played,Payed,TournamentId")] Match match)
        {
            if (ModelState.IsValid)
            {
                _context.Add(match);
                await _context.SaveChangesAsync();

                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));
        }
예제 #12
0
        public async Task <IActionResult> Create([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 (ModelState.IsValid)
            {
                _context.Add(teamList);
                await _context.SaveChangesAsync();

                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));
        }