/************************************ View User's ERole ********************************************/
 /// <summary>
 /// Creator: Chase Schutle
 /// Created: 03/01/2020
 /// Approver: Jordan Lindo
 ///
 /// Allows a user to view a specific user's Eroles
 /// </summary>
 /// <remarks>
 /// Updater: Chase Schulte
 /// Updated: 04/10/2020
 /// Update: Restored functionality
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnViewUserRoles_Click(object sender, RoutedEventArgs e)
 {
     if (dgUserList.SelectedItem != null)
     {
         try
         {
             //Prepare canvas
             canUserView.Visibility       = Visibility.Hidden;
             canAddUser.Visibility        = Visibility.Hidden;
             canViewUserERoles.Visibility = Visibility.Visible;
             btnCreateUser.IsEnabled      = false;
             //Prepare canvas functionality
             _eRoleManager = new ERoleManager();
             _petUniverseUserERolesManager = new PetUniverseUserERolesManager();
             _petUniverseUser = (PetUniverseUser)dgUserList.SelectedItem;
             refreshListBox();
             lblUserID.Content = _petUniverseUser.PUUserID.ToString();
         }
         catch (Exception ex)
         {
             WPFErrorHandler.ErrorMessage(ex.Message);
         }
     }
     else
     {
         WPFErrorHandler.ErrorMessage("Please select a valid user");
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creator: Jordan Lindo
 /// Created: 4/8/2020
 /// Approver: Chase Schulte
 ///
 /// Constructor that takes a user argument.
 /// </summary>
 /// <remarks>
 /// Updater: NA
 /// Updated: NA
 /// Update: NA
 ///
 /// </remarks>
 public pgSupervisorSchedule(PetUniverseUser user)
 {
     InitializeComponent();
     _user = user;
     _baseScheduleManager       = new BaseScheduleManager();
     _shiftTimeManager          = new ShiftTimeManager();
     _scheduleManager           = new ScheduleManager();
     _departmentManager         = new DepartmentManager();
     _eRoleManager              = new ERoleManager();
     _universeUserERolesManager = new PetUniverseUserERolesManager();
     _shiftManager              = new ShiftManager();
     _userManager = new UserManager();
     _startDate   = DateTime.Now;
 }