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 });
        }
Exemple #2
0
        public override bool Update()
        {
            if (dbArea.Segments.Count == 0)
                return false;

            ResetCalcValues();
            foreach (var segment in dbArea.Segments)
            {
                SegmentUpdate segmentUpdater = new SegmentUpdate(segment.SegmentID) { StravaWebClientObj = StravaWebClientObj };

                var segmentStat = segmentUpdater.UpdateSegment();
                UpdateEffortOnSegment(segment.SegmentID, segmentStat, segmentUpdater);

                AddStatData(segmentStat.Info);
            }
            return base.Update();
        }