MVC-kopplingen till tournament tracker är klar

This commit is contained in:
2020-05-14 21:16:25 +02:00
parent dc4162db95
commit bd0c6f0a7c
16 changed files with 1206 additions and 931 deletions

View File

@ -35,7 +35,7 @@ namespace TrackerLibrary
{
foreach (MatchupModel rm in round)
{
if (rm.Winner == null && (rm.Entries.Any(x => x.Score != 0) || rm.Entries.Count == 1))
if ((rm.Entries.Any(x => x.Score != 0) || rm.Entries.Count == 1))
{
toScore.Add(rm);
}
@ -108,7 +108,20 @@ namespace TrackerLibrary
if (p.CellPhoneNumber.Length > 0)
{
SMSLogic.SendSMSMessage(p.CellPhoneNumber, $"You have a new matchup with {competitor.TeamCompeting.TeamName}");
try
{
if (competitor != null)
{
SMSLogic.SendSMSMessage(p.CellPhoneNumber, $"You have a new matchup with {competitor.TeamCompeting.TeamName}");
}
else
{
SMSLogic.SendSMSMessage(p.CellPhoneNumber, $"You have a bye week for your first round.");
}
}
catch
{
}
}
}