Exemple #1
0
 public List <Employee> GetFilteredEmployeeList(bool active = true)
 {
     try
     {
         return(EmployeeAccessor.RetrieveEmployeeList(active));
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Reply hazy. Try again later.", ex);
     }
 }
Exemple #2
0
 /// <summary>
 /// Ariel Sigo
 /// Created 2017/10/02
 ///
 /// Refreshes Employee List
 /// </summary>
 private void RefreshEmployeeList()
 {
     try
     {
         employees = EmployeeAccessor.RetrieveEmployeeList();
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #3
0
        /// <summary>
        /// Daniel Brown
        /// Created 02/08/2017
        ///
        /// retrieve a list of all active employees
        ///
        /// Update
        /// Bobby Thorne
        /// 5/7/2017
        ///
        /// Foreach loop adds a first name, last name to the data object employee so
        /// It can be used in the employee data grid in replace of the userId
        /// </summary>
        /// <returns>A list of Employee objects</returns>
        public List <Employee> RetrieveEmployeeList()
        {
            UserManager     userManager = new UserManager();
            List <Employee> employees   = null;

            try
            {
                employees = EmployeeAccessor.RetrieveEmployeeList();
                foreach (Employee e in employees)
                {
                    e.EmployeeName = userManager.RetrieveUser(e.UserId).LastName + ", " + userManager.RetrieveUser(e.UserId).FirstName;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(employees);
        }