Пример #1
0
        /// <summary>
        /// Procède à l'authentification en fonction des données de connexion entrées.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnValider_Click(object sender, EventArgs e)
        {
            if (txtIdentifiant.Text != string.Empty && txtMdp.Text != string.Empty)
            {
                controle.Authentification(txtIdentifiant.Text, txtMdp.Text);
            }

            else
            {
                ErreurConnexion();
            }
        }
Пример #2
0
        private void btn_connexion_Click(object sender, EventArgs e)
        {
            string nom    = txb_nom.Text;
            string prenom = txb_prenom.Text;
            string pwd    = txb_pwd.Text;

            Developpeur developpeur = new Developpeur(0, nom, prenom, "", "", 0, "", pwd);

            if (controle.Authentification(developpeur))
            {
                this.Visible = false;
                (new frm_Habilitation(controle)).ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Données incorrecte", "Echec de l'authentification", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }