public ActionResult PlayerScoring(PlayerScoringViewModel viewModel) { if (viewModel.EventCommand == "back") { return(RedirectToAction("Index", "Home")); } if (viewModel.EventCommand == "cancel") { return(View(new PlayerScoringViewModel())); } viewModel.GetPlayerScoring(); return(View(viewModel)); }
public ActionResult PlayerScoring(int?SelectedPlayer, int?SelectedRound) { var vm = new PlayerScoringViewModel(); if ((SelectedPlayer != null) && (SelectedRound != null)) { vm.SelectedPlayer = SelectedPlayer.Value; vm.SelectedRound = SelectedRound.Value.ToString(); vm.GetPlayerScoring(); } return(View(vm)); }