Teams creation and prizes creation are implemented

This commit is contained in:
2020-05-05 23:25:28 +02:00
parent fc49f33575
commit 9596d9aa47
15 changed files with 387 additions and 4 deletions

View File

@ -15,6 +15,7 @@ namespace TrackerLibrary.DataAccess
void CompleteTournament(TournamentModel model);
List<TeamModel> GetTeam_All();
List<PersonModel> GetPerson_All();
List<PrizeModel> GetPrizes_All();
List<TournamentModel> GetTournament_All();
}
}

View File

@ -225,6 +225,16 @@ namespace TrackerLibrary.DataAccess
return output;
}
public List<PrizeModel> GetPrizes_All()
{
List<PrizeModel> output;
using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(GlobalConfig.CnnString(db)))
{
output = connection.Query<PrizeModel>("dbo.spPrizes_GetAll").ToList();
}
return output;
}
public List<TournamentModel> GetTournament_All()
{
List<TournamentModel> output;

View File

@ -122,6 +122,13 @@ namespace TrackerLibrary.DataAccess
.ConvertToTournamentModels();
}
public List<PrizeModel> GetPrizes_All()
{
List<PrizeModel> output;
output = GlobalConfig.PrizesFile.FullFilePath().LoadFile().ConvertToPrizeModels();
return output;
}
public void UpdateMatchup(MatchupModel model)
{
model.UpdateMatchupToFile();