Пример #1
0
        private static int GetPeriodScorePosition(PeriodScore periodScore)
        {
            switch (periodScore.Type)
            {
            case PeriodScoreType.RegularPeriod: return(periodScore.Number.GetValueOrDefault(0));

            case PeriodScoreType.Overtime: return(1000 + periodScore.Number.GetValueOrDefault(0));

            case PeriodScoreType.Penalties: return(2000 + periodScore.Number.GetValueOrDefault(0));

            default: return(3000 + periodScore.Number.GetValueOrDefault(0));
            }
        }
Пример #2
0
        private void InitializePeriodScoring(IEnumerable <string> periodList)
        {
            foreach (string period in periodList)
            {
                PeriodScore periodScore = new PeriodScore
                {
                    HomeScore = 0,
                    AwayScore = 0
                };

                PeriodScoreDictionary[period] = periodScore;
            }
        }
        public async Task <IHttpActionResult> GetAllByDealerId([FromBody] PeriodScore score)
        {
            var collection = await Task.Run(() => scoreApl.GetByDealer(score.DealerId, score.StartDate, score.EndDate));

            return(this.Ok(collection));
        }