public Authentification() { InitializeComponent(); if (ORM.Connexion()) { lbConnServeur.Text = "Connecté"; } else { lbConnServeur.Text = "Déconnecté"; } }
public Inscription() { InitializeComponent(); if (ORM.Connexion()) { lbConn.Text = "On"; } else { lbConn.Text = "Off"; } }
private void btValider_Click_1(object sender, EventArgs e) { if (ORM.InscriptionUser(tbUser.Text, tbEmail.Text, tbMDP.Text) == 0) { MessageBox.Show("Le compte a bien été enregistré"); } else { Form f = new Authentification(); this.Hide(); f.Show(); } }
private void btSeConnecter_Click(object sender, EventArgs e) { if (ORM.Existe(tbUsername.Text, tbMDP.Text) == 1) { dashboard = new Dashboard(); dashboard.user = tbUsername.Text; dashboard.mdp = tbMDP.Text; MessageBox.Show(tbUsername.Text); dashboard.Show(); this.Hide(); } else { MessageBox.Show("soucis"); } }