private void BackMenuButton_Click(object sender, RoutedEventArgs e)
        {
            StudentMenu studentMenu = new StudentMenu(studentNumber);

            studentMenu.Show();
            this.Hide();
        }
        private void LogInButton_Click_1(object sender, RoutedEventArgs e)
        {
            //method that loads the databases into lists and compares the users input to that from the database
            bool isCorrect = false;

            QueryDatabaseStudents();
            QueryDatabaseLecturers();
            try
            {
                //loop running through all lectures
                for (int i = 0; i < lecturesList.Count; i++)
                {
                    if (usernameTextBox.Text == lecturesList[i].LectureID && EncryptionDll.EncryptData(passwordTextBox.Text, "ffhhgfgh") == lecturesList[i].Password)
                    {
                        LectureID = lecturesList[i].LectureID;
                        LectureMenu lecturerMenu = new LectureMenu(LectureID);
                        this.Hide();
                        lecturerMenu.Show();
                        isCorrect = true;
                        break;
                    }
                }
                //loop running through all students
                for (int i = 0; i < studentsList.Count; i++)
                {
                    if (usernameTextBox.Text == studentsList[i].StudentID && EncryptionDll.EncryptData(passwordTextBox.Text, "ffhhgfgh") == studentsList[i].Password)
                    {
                        StudentMenu studentMenu = new StudentMenu(studentsList[i].StudentID);
                        studentMenu.Show();
                        this.Hide();
                        isCorrect = true;
                        break;
                    }
                }
            }
            catch (Exception)
            {
            }
            if (isCorrect == false)
            {
                MessageBox.Show("invalid username or password. Try again!", "LogIn Error", MessageBoxButton.OK);
            }
        }