private void Button_Click(object sender, RoutedEventArgs e)
        {
            SQLiteConnection sqliteCon = new SQLiteConnection(dbConnectionString);

            // Verbindung mit dem DB öffenen

            try
            {
                sqliteCon.Open();
                string        Query         = "select * from Benutzer where Benutzer_login = '******' and Passwort = '" + this.txt_password.Password + "' ";
                SQLiteCommand CreateCommand = new SQLiteCommand(Query, sqliteCon);
                CreateCommand.ExecuteNonQuery();
                SQLiteDataReader reader = CreateCommand.ExecuteReader();
                int count = 0;

                while (reader.Read())
                {
                    count++;
                }
                if (count == 1)
                {
                    NavPage win2 = new NavPage();
                    this.Content = win2;
                }
                if (count > 1)
                {
                    MessageBox.Show("Benutzername und Passwort sind Duplicate !");
                }
                if (count < 1)
                {
                    MessageBox.Show("Benutzername und Passwort sind nicht Korrekt !");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            sqliteCon.Close();
        }
示例#2
0
        private void cmd_abb_Click(object sender, RoutedEventArgs e)
        {
            NavPage win2 = new NavPage();

            win2.Content = win2;
        }