Add WPFUi to prevent stuck state

Add Range to TournamentService
Use DataTable to export CSV
DataTable can be ordered on Total
This commit is contained in:
2019-05-31 23:34:34 +02:00
parent 3d73071925
commit 21713fed69
7 changed files with 227 additions and 114 deletions

View File

@@ -21,13 +21,19 @@ namespace LaDOSE.Api.Controllers
_service = service;
}
[HttpGet("GetTournaments")]
public async Task<List<TournamentDTO>> GetChallonges()
//This may be a get , but i dont know what the RFC State for Get request with Body
//As i don't like to populate GET request with body this will be a post (and i think
//it will be easier to proxy.
[HttpPost("GetTournaments")]
public async Task<List<TournamentDTO>> GetChallonges([FromBody] TimeRangeDTO dto)
{
var tournaments = await _service.GetTournaments(DateTime.Now.AddMonths(-2), null);
return AutoMapper.Mapper.Map<List<TournamentDTO>>(tournaments);
if (dto.To.HasValue | dto.From.HasValue)
{
var tournaments = await _service.GetTournaments(dto.From, dto.To);
return AutoMapper.Mapper.Map<List<TournamentDTO>>(tournaments);
}
return null;
}