public ActionResult AddPlayerToTeam(int id) { ShowTeamsViewModel teams = new ShowTeamsViewModel { PlayerId = id, Teams = mngLogic.GetAvailableTeams(), }; return(View(teams)); }
public ActionResult AddPlayerToTeam(ShowTeamsViewModel model) { mngLogic.AddPlayerToTeam(model.PlayerId, model.SelectedTeamId); return(RedirectToAction("Index")); }