Esempio n. 1
0
        private void uxRunsButton_Click(object sender, EventArgs e)
        {
            Hide();
            var runs = new TrainingRuns(trainingRunController.FetchTrainingRuns(Program.currentUser.UserId));

            runs.Closed += (s, args) => Close();
            runs.Show();
        }
        private void uxCancelButton_Click(object sender, EventArgs e)
        {
            ITrainingRunRepository trainingRunController = new SqlTrainingRunRepository(Program.connectionString);

            Hide();
            var runs = new TrainingRuns(trainingRunController.FetchTrainingRuns(Program.currentUser.UserId));

            runs.Closed += (s, args) => Close();
            runs.Show();
        }
        private void uxLogRunButton_Click(object sender, EventArgs e)
        {
            controller.CreateTrainingRun(Program.currentUser.UserId, uxDateTimePicker.Value, Convert.ToInt32(uxDistanceTextBox.Text), Convert.ToInt32(uxTimeTextBox.Text), Convert.ToInt32(uxAverageHRTextBox.Text));
            ITrainingRunRepository trainingRunController = new SqlTrainingRunRepository(Program.connectionString);

            Hide();
            var runs = new TrainingRuns(trainingRunController.FetchTrainingRuns(Program.currentUser.UserId));

            runs.Closed += (s, args) => Close();
            runs.Show();
        }