Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            int res = CheckUser();

            if (res == 0)
            {
                Account user = logic.RegisterUser(
                    textBox1.Text, textBox2.Text, textBox3.Text, dateTimePicker1.Value,
                    textBox5.Text, textBox6.Text, textBox4.Text, image, group
                    );
                if (user != null)
                {
                    this.Hide();
                    // пользователь зареген
                    if (group > 1)
                    {
                        parent.Hide();
                        Dashboard dsh = new Dashboard(parent, user.Idgroup, user.Id);
                        dsh.ShowDialog();
                    }
                }
            }
        }