Now it is possible to finnish a tournament with scores and mails

This commit is contained in:
2020-04-20 23:44:09 +02:00
parent 5d0d891024
commit ac1d5371f2
9 changed files with 144 additions and 7 deletions

View File

@ -126,5 +126,19 @@ namespace TrackerLibrary.DataAccess
{
model.UpdateMatchupToFile();
}
public void CompleteTournament(TournamentModel model)
{
List<TournamentModel> tournaments = GlobalConfig.TournamentFile
.FullFilePath()
.LoadFile()
.ConvertToTournamentModels();
tournaments.Remove(model);
tournaments.SaveToTournamentFile();
TournamentLogic.UpdateTournamentResults(model);
}
}
}