Пример #1
0
        private async void SetTimes(int obj)

        {
            var time = new Time();

            for (int j = 0; j < obj; j++)
            {
                for (int i = 0; i < SelectedRunners.Count; i++)
                {
                    time.Times       = new TimeSpan(0, 0, 0);
                    time.Distance    = listofraces.DistanceName;
                    time.Repetitions = j + 1;
                    await TimeServices.AddTime(time);

                    time.Runner = SelectedRunners[i];
                    time.Event  = NewEvent;
                    await TimeServices.AddEventToTime(time);
                }
            }
            ShowList.Add(new ListofRaces()
            {
                DistanceName = listofraces.DistanceName, Reps = listofraces.Reps, EventId = NewEvent.Id
            });
            listofraces.Reps         = 1;
            listofraces.DistanceName = null;
        }
Пример #2
0
        private async void ReSetTimes(ListofRaces race, int reps)
        {
            var time = new Time();

            for (int j = 0; j < reps; j++)
            {
                for (int i = 0; i < SelectedRunners.Count; i++)
                {
                    time.Times       = new TimeSpan(0, 0, 0);
                    time.Distance    = race.DistanceName;
                    time.Repetitions = j + 1;
                    await TimeServices.AddTime(time);

                    time.Runner = SelectedRunners[i];
                    time.Event  = NewEvent;
                    await TimeServices.AddEventToTime(time);
                }
            }
        }