예제 #1
0
        public ActionResult Update(int segment, int athlete)
        {
            SegmentUpdate segmentUpdate = new SegmentUpdate(segment);
            segmentUpdate.UpdateSegment();
            segmentUpdate.UpdateEfforts(segment);

            return RedirectToAction("Index", new { athlete = athlete, segment = segment });
        }
예제 #2
0
        private void UpdateEffortOnSegment(int segmentID, Models.Segment segmentInfo, SegmentUpdate segmentUpdater)
        {
            segmentUpdater.UpdateEfforts(segmentInfo);
            RidesWorstTime.Add(segmentID, segmentUpdater.WorstPlacing);

            // Update Leaderboard (dictionary)
            var segmentLBoards = segmentUpdater.LeaderBoards;
            foreach (var segmentLBoard in segmentLBoards)
            {
                AddToAthleteRidesLBoards(segmentLBoard.AthleteID, segmentID, segmentLBoard);
            }

            // Update Info
            Info.NoRidden += segmentLBoards.Count(); // verify it works as expected
            //info.NoRiders =
        }