public ActionResult AddMatch() { SelectList sports = new SelectList(betListProvider.GetSports(), "SportId", "Name"); if (sports == null) { log.Error("Controller: Match, Action: AddMatch Don't GetSports"); return(RedirectToAction("InfoError", "Error")); } ViewBag.Sports = sports; SelectList tournaments = new SelectList(betListProvider.GetTournamentes(), "TournamentId", "Name"); if (tournaments == null) { log.Error("Controller: Match, Action: AddMatch Don't GetTournamentes"); return(RedirectToAction("InfoError", "Error")); } ViewBag.Tournaments = tournaments; SelectList teams = new SelectList(teamProvider.GetTeamsAll(), "TeamId", "Name"); if (teams == null) { log.Error("Controller: Match, Action: AddMatch Don't GetTeamsAll"); return(RedirectToAction("InfoError", "Error")); } ViewBag.Teams = teams; return(View()); }
public ActionResult ShowTeams() { IReadOnlyList <Team> teams = teamProvider.GetTeamsAll(); if (teams == null) { log.Error("Controller: Team, Action: ShowTeams Don't GetTeamsAll"); return(RedirectToAction("InfoError", "Error")); } return(PartialView(teams)); }