private void button1_Click(object sender, EventArgs e)
        {
            ActiveForm.Hide();
            егистрация_на_марафон regm = new  егистрация_на_марафон(email);

            regm.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            string result = checkToAdd();

            if (result == "ОК")
            {
                SqlConnection conn = new SqlConnection(Connection.GetString());
                conn.Open();
                try
                {
                    DateTime dateOfBirth = Convert.ToDateTime(dateTimePicker1.Value);
                    connectionSql.Open();

                    command = new SqlCommand($"insert into [dbo].[User] (Email, Password, FirstName, LastName, RoleId, Picture) values('{textBox1.Text}', '{textBox2.Text}','{textBox4.Text.ToUpper()}','{textBox5.Text.ToUpper()}','R', '{textBox6.Text.ToUpper()}')", connectionSql);
                    command.ExecuteNonQuery();
                    connectionSql.Close();



                    connectionSql.Open();
                    command = new SqlCommand($"insert into [dbo].[Runner] (Email, Gender, DateOfBirth, CountryCode) values('{textBox1.Text}','{comboBox1.Text}', '{dateTimePicker1.Value}',(select [CountryCode] from [Country] where CountryName = '{comboBox2.Text}'))", connectionSql);

                    command.ExecuteNonQuery();

                    Авторизация.email = textBox1.Text;
                    егистрация_бегуна.ActiveForm.Hide();
                    егистрация_на_марафон form = new  егистрация_на_марафон(email);
                    form.Show();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(exception.Message);
                }
                finally
                {
                    connectionSql.Close();
                }
            }
            else
            {
                MessageBox.Show(result);
            }
        }