Beispiel #1
0
        public ActionResult AddMatch(AddNewMatchChoices model, int leagueId)
        {
            Match match   = model.Match;
            int   matchId = MatchService.AddNewMatch(match, leagueId, match.HomeTeam.Id, match.AwayTeam.Id);

            return(RedirectToAction("AddDetailsForMatch", new { id = matchId }));
        }
Beispiel #2
0
        public ActionResult AddNewMatch(int leagueId)
        {
            ViewBag.LeagueId = leagueId;
            var teams = MatchService.GetTeamsForChoices(leagueId);

            AddNewMatchChoices model = new AddNewMatchChoices
            {
                Teams = teams
            };

            return(View(model));
        }
Beispiel #3
0
        public ActionResult AddDetailsForMatch(int id)
        {
            ViewBag.MatchId = id;

            var players = MatchService.GetPlayersForChoices(id);

            AddNewMatchChoices model = new AddNewMatchChoices
            {
                Players = players
            };

            return(View(model));
        }
Beispiel #4
0
 public ActionResult AddMatchDetails(AddNewMatchChoices model, int matchId)
 {
     MatchService.AddScorersAndAssistants(matchId, model.Scorers, model.Assistants);
     return(RedirectToAction("Index", "Home"));
 }