Example #1
0
        private void button_connect_Click(object sender, RoutedEventArgs e)
        {
            PPE4Entities db = new PPE4Entities();

            if (db.administrateurs.Any(x => x.Login == TextBox_Login.Text && x.Password == PasswordBox.Password))
            {
                MessageBox.Show("Bienvenue");
                window.MenuLinkGroups.Remove(aremove0);
                window.MenuLinkGroups.Add(aremove1);
                window.MenuLinkGroups.Add(aremove2);
                window.MenuLinkGroups.Add(aremove3);
                window.MenuLinkGroups.Add(aremove4);
                window.MenuLinkGroups.Add(aremove5);
            }
            else
            {
                MessageBox.Show("Utilisateur inconnu");
            }
        }