private void Window_Closed(object sender, EventArgs e) // pressing close button takes us back to student main window.
        {
            this.Close();
            User_Login_Page from = new User_Login_Page();

            from.Show();
        }
        private void Button_Click_7(object sender, RoutedEventArgs e)
        {
            this.Hide();
            User_Login_Page admin_Main_Page = new User_Login_Page();

            admin_Main_Page.Show();
        }
 private void btnChangePass_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         User user = new User();
         user.UserID   = txtUserName.Text.ToString();
         user.Password = txtPassword.Password.ToString();
         AdminBL adminBL = new AdminBL();
         bool    result  = adminBL.ChangePassword(user);
         if (result == true)
         {
             if (MessageBox.Show("Do you want Change Password?", "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
             {
                 MessageBox.Show("Change Successfully");
                 this.Hide();
                 User_Login_Page t = new User_Login_Page();
                 t.Show();
             }
         }
         else
         {
             this.Close();
             MessageBox.Show("Change password Failed!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
        private void logout_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
            User_Login_Page user_Login_Page = new User_Login_Page();

            user_Login_Page.Show();
        }