示例#1
0
 private void DemandeATraiter(object sender, RoutedEventArgs e)
 {
     DemandeATraiter demande = new DemandeATraiter();
     DialogResult = false;
     Close();
     demande.ShowDialog();
 }
示例#2
0
        private void DemandeATraiter(object sender, RoutedEventArgs e)
        {
            DemandeATraiter demande = new DemandeATraiter();

            DialogResult = false;
            Close();
            demande.ShowDialog();
        }
示例#3
0
        private void Valider(object sender, RoutedEventArgs e)
        {
            DataBaseManager dbm   = DataBaseManager.getInstance();
            String          log   = login.Text;
            String          pass  = password.Password;
            String          query = "SELECT * FROM utilisateur WHERE Login='******' AND Mdp='" + pass + "';";
            //Console.WriteLine("login: "******" Password: "******"SELECT * FROM utilisateur WHERE Login="******" AND Mdp=" + pass + ";");
            var reader = dbm.executerRequete(query);

            Console.WriteLine(reader);
            if (reader is Boolean)
            {
                MessageBox.Show("Identifiant ou mot de passe incorrect");
            }
            else if (reader is String)
            {
                MessageBox.Show(reader);
            }
            else
            {
                switch ((String)reader[6])
                {
                case "regulateur":
                    DemandeATraiter dat = new DemandeATraiter();
                    Close();
                    dat.ShowDialog();
                    break;

                case "soin":
                    DemandeEnCours dec = new DemandeEnCours();
                    Close();
                    dec.ShowDialog();
                    break;

                case "ambulancier":
                    DemandeFinale df = new DemandeFinale();
                    Close();
                    df.ShowDialog();
                    break;

                case "admin":
                    //en attente fenetre création compte
                    //Close();
                    //demande.ShowDialog();
                    break;

                default:
                    MessageBox.Show("Problème avec votre compte. Veuillez contacter l'administrateur.");
                    break;
                }
            }
        }
示例#4
0
 private void Valider(object sender, RoutedEventArgs e)
 {
     DataBaseManager dbm = DataBaseManager.getInstance();
     String log = login.Text;
     String pass = password.Password;
     String query = "SELECT * FROM utilisateur WHERE Login='******' AND Mdp='" + pass + "';";
     //Console.WriteLine("login: "******" Password: "******"SELECT * FROM utilisateur WHERE Login="******" AND Mdp=" + pass + ";");
     var reader = dbm.executerRequete(query);
     Console.WriteLine(reader);
     if (reader is Boolean)
         MessageBox.Show("Identifiant ou mot de passe incorrect");
     else if(reader is String)
         MessageBox.Show(reader);
     else {
         switch((String)reader[6]){
             case "regulateur":
                 DemandeATraiter dat = new DemandeATraiter();
                 Close();
                 dat.ShowDialog();
                 break;
             case "soin":
                 DemandeEnCours dec = new DemandeEnCours();
                 Close();
                 dec.ShowDialog();
                 break;
             case "ambulancier":
                 DemandeFinale df = new DemandeFinale();
                 Close();
                 df.ShowDialog();
                 break;
             case "admin":
                 //en attente fenetre création compte
                 //Close();
                 //demande.ShowDialog();
                 break;
             default:
                 MessageBox.Show("Problème avec votre compte. Veuillez contacter l'administrateur.");
                 break;
         }
     }
 }