/************************************ 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");
     }
 }
Example #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;
 }
Example #3
0
 /// <summary>
 /// Creator: Jordan Lindo
 /// Created: 3/18/2020
 /// Approver:  Chase Schulte
 ///
 /// This is a constructor method that takes no arguments.
 /// </summary>
 /// <remarks>
 /// Updater: NA
 /// Updated: NA
 /// Update: NA
 ///
 /// </remarks>
 public BaseScheduleControls()
 {
     InitializeComponent();
     _baseScheduleManager = new BaseScheduleManager();
     _departmentManager   = new DepartmentManager();
     _shiftTimeManager    = new ShiftTimeManager();
     _eRoleManager        = new ERoleManager();
     _dGLines             = new List <BaseScheduleLine>();
     _user                     = new PetUniverseUser();
     _departmentNames          = getDepartmentNames();
     cboDepartment.ItemsSource = _departmentNames;
     getBaseScheduleVM();
     canBaseSchedule.Visibility     = Visibility.Visible;
     canEditBaseSchedule.Visibility = Visibility.Hidden;
     _maxCount = 30;
 }
Example #4
0
 public ViewAllRoles()
 {
     InitializeComponent();
     _departmentManager = new DepartmentManager();
     _eRoleManager      = new ERoleManager();
 }