public ActionResult ValidateAllRoundMatchups() { List <List <string> > errors = RoundMatchupActions.GetRoundMatchupErrors(_context); TempData["DuplicatePlayers"] = string.Join(" | ", errors[0]); TempData["DuplicateOpponents"] = string.Join(" | ", errors[1]); TempData["OverallocatedPlayers"] = string.Join(" | ", errors[2]); TempData["UnallocatedPlayers"] = string.Join(" | ", errors[3]); return(RedirectToAction(nameof(AllRounds))); }
public ActionResult ValidateAllRoundMatchups() { List <List <string> > errors = RoundMatchupActions.GetRoundMatchupErrors(_context); if (errors[0].Count == 0 && errors[1].Count == 0 && errors[2].Count == 0 && errors[3].Count == 0) { TempData["Status"] = "You're good to go!"; } TempData["DuplicateOpponents"] = string.Join(" | ", errors[1]); TempData["OverallocatedPlayers"] = string.Join(" | ", errors[2]); TempData["UnallocatedPlayers"] = string.Join(" | ", errors[3]); return(RedirectToAction(nameof(AllRounds))); }