Ejemplo n.º 1
0
 private void Registration_Click(object sender, EventArgs e)
 {
     if (!((textBoxLogin.Text == "") && (textBoxPass.Text == "")))
     {
         if (new User(textBoxLogin.Text, textBoxPass.Text).IsUserExist() == false)
         {
             MessageBox.Show("Пользователь уже существует!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else if (textBoxPass.Text != textBoxPass2.Text)
         {
             MessageBox.Show("Пароли не совпадают!", "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             new User(textBoxLogin.Text, textBoxPass.Text).SaveToDb();
             MessageBox.Show("Регистрация прошла успешно!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
             this.Close();
             FormAuth H = new FormAuth();
             H.Show();
         }
     }
     else
     {
         MessageBox.Show("Ничего не введено!", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 2
0
        private void UnloginToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormAuth n = new FormAuth();

            n.ShowDialog();
        }
Ejemplo n.º 3
0
        private void Exit_Click(object sender, EventArgs e)
        {
            FormAuth H = new FormAuth();

            H.Show();
            this.Close();
        }
Ejemplo n.º 4
0
        private void выходИзУчетнойЗаписиToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormAuth n = new FormAuth();

            n.ShowDialog();
        }