Пример #1
0
        private void btnSubmit_Click(object sender, RoutedEventArgs e)
        {
            string mail = txtMail.Text;
            string mdp  = txtMDP.Text;

            if (RessourceSQL.est_client(mail, mdp))
            {
                string[]     tab = RessourceSQL.nom_prenom_Client(mail);
                windowClient w   = new windowClient(tab[0], tab[1]);
                this.Visibility = Visibility.Hidden;
                w.Show();
            }

            if (RessourceSQL.est_CdR(mail, mdp))
            {
                string[]  tab = RessourceSQL.nom_prenom_CdR(mail);
                windowCdR w   = new windowCdR(tab[0], tab[1], tab[2], Convert.ToInt32(tab[3]));
                this.Visibility = Visibility.Hidden;
                w.Show();
            }

            if (RessourceSQL.est_gestionnaire(mail, mdp))
            {
                string[]           tab = RessourceSQL.nom_prenom_Gestionnaire(mail);
                windowGestionnaire w   = new windowGestionnaire(tab[0], tab[1]);
                this.Visibility = Visibility.Hidden;
                w.Show();
            }
        }