Ejemplo n.º 1
0
    public IHttpActionResult UpsertAthleteSizes(List <AthleteSizeUpsert> athleteSizes, string sportId, string athleteId)
    {
        try
        {
            AthleteSizesService.UpsertAthleteSizes(athleteSizes, sportId, athleteId);

            return(StatusCode(HttpStatusCode.NoContent));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Ejemplo n.º 2
0
    public DataTable GetTeamSizes(string sportId)
    {
        try
        {
            var sportItems = SportsItemService.GetSportItemsBySport(sportId);
            var teamSizes  = AthleteSizesService.GetTeamSizes(sportId);

            DataTable table = AthleteSizesService.MapTeamSizes(sportItems, teamSizes);

            return(table);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Ejemplo n.º 3
0
    public IHttpActionResult GetAthleteSizeById(string sportId, string athleteId)
    {
        try
        {
            var sizes = AthleteSizesService.GetAthleteSizeById(sportId, athleteId);

            if (sizes == null)
            {
                return(NotFound());
            }

            return(Ok(sizes));
        }
        catch (Exception ex)
        {
            throw return(ex);
        }
    }
Ejemplo n.º 4
0
    public IQueryable <AthleteSizeCountVm> GetTeamSizeCounts(string sportId)
    {
        try
        {
            var counts = AthleteSizesService.GetTeamSizeCounts(sportId);

            if (counts == null)
            {
                return(NotFound());
            }

            return(Ok(counts));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }