private void Page_Loaded(object sender, RoutedEventArgs e) { try { //Set up screen ResetFields(); usernameLabel.Content = user.LoginMessage(); patronLabel.Content = "Patron: " + patron.ToString(); //Set fields books = ((MainWindow)App.Current.MainWindow).Books; logs = ((MainWindow)App.Current.MainWindow).Logs; people = ((MainWindow)App.Current.MainWindow).People; //Get list of checked out logs and the list of overdue logs SetListBox(); //Check for good standing, report if bad goodStanding = IsInGoodStanding(); } catch (Exception ex) { errorLabel.Content = ErrorHandler.InnermostExceptionMessage(ex); } }
//This constructor is used to display the user (librarian) data of the logged in librarian. public SearchResultsPage(BookSearch SearchResults, LibrarianBLL User) : this(SearchResults) { user = User; modeLabel.Content = user.LoginMessage(); }