Beispiel #1
0
        /// <summary>
        /// 根据员工帐号ID获取所有员工信息,加载所属公司信息
        /// </summary>
        /// <param name="accountID"></param>
        /// <returns></returns>
        public Employee GetEmployeeByAccountID(int accountID)
        {
            Employee employee = _dalEmployee.GetEmployeeByAccountID(accountID);

            if (employee == null)
            {
                return(null);
            }
            if (employee.EmployeeDetails != null &&
                employee.EmployeeDetails.Work != null)
            {
                if (employee.EmployeeDetails.Work.Company != null)
                {
                    employee.EmployeeDetails.Work.Company =
                        _IDepartmentBll.GetDepartmentById(employee.EmployeeDetails.Work.Company.Id, null);
                }
                if (employee.EmployeeDetails.Work.Company == null)
                {
                    employee.EmployeeDetails.Work.Company = new Department(0, "");
                }
            }
            Employee employeeskill = _dalEmployeeSkill.GetEmployeeSkillByAccountID(accountID, "", -1, SkillLevelEnum.All);

            if (employeeskill != null)
            {
                employee.EmployeeSkills = employeeskill.EmployeeSkills;
            }
            employee.AdjustRule = _EmployeeAdjustRuleDal.GetAdjustRuleByAccountID(employee.Account.Id);
            return(LoadSEPInfo.SetEmployeeAccountInfo(accountID, employee, _IAccountBll, _IDepartmentBll, _IPositionBll));
        }
Beispiel #2
0
        /// <summary>
        /// 根据员工帐号ID获取所有员工基本信息和员工技能信息
        /// </summary>
        /// <param name="accountID"></param>
        /// <returns></returns>
        public Employee GetEmployeeSkillInfoByAccountID(int accountID)
        {
            Employee employee =
                _dalEmployeeSkill.GetEmployeeSkillByAccountID(accountID, "", -1, SkillLevelEnum.All);

            if (employee == null)
            {
                return(null);
            }
            //return LoadSEPInfo.SetEmployeeAccountInfo(accountID, employee, _IAccountBll, _IDepartmentBll);
            return(LoadSEPInfo.SetEmployeeAccountInfo(accountID, employee, _IAccountBll, _IDepartmentBll, _IPositionBll));
        }
Beispiel #3
0
        /// <summary>
        /// 获取Employee表的所有员工的基本信息
        /// </summary>
        /// <returns></returns>
        public List <Employee> GetAllEmployeeBasicInfo()
        {
            List <Employee> employeeList = _dalEmployee.GetAllEmployeeBasicInfo();

            if (employeeList == null)
            {
                return(new List <Employee>());
            }
            foreach (Employee employee in employeeList)
            {
                //LoadSEPInfo.SetEmployeeAccountInfo(employee.Account.Id, employee, _IAccountBll, _IDepartmentBll);
                LoadSEPInfo.SetEmployeeAccountInfo(employee.Account.Id, employee, _IAccountBll, _IDepartmentBll, _IPositionBll);
            }
            return(employeeList);
        }
Beispiel #4
0
        /// <summary>
        /// 根据员工帐号ID获取员工所有基本信息
        /// </summary>
        /// <param name="accountID"></param>
        /// <returns></returns>
        public Employee GetEmployeeBasicInfoByAccountID(int accountID)
        {
            Employee employee = _dalEmployee.GetEmployeeBasicInfoByAccountID(accountID);

            if (employee == null)
            {
                return(null);
            }
            if (employee.EmployeeDetails != null &&
                employee.EmployeeDetails.Work != null)
            {
                if (employee.EmployeeDetails.Work.Company != null)
                {
                    employee.EmployeeDetails.Work.Company =
                        _IDepartmentBll.GetDepartmentById(employee.EmployeeDetails.Work.Company.Id, null);
                }
                if (employee.EmployeeDetails.Work.Company == null)
                {
                    employee.EmployeeDetails.Work.Company = new Department(0, "");
                }
            }
            //return LoadSEPInfo.SetEmployeeAccountInfo(accountID, employee, _IAccountBll, _IDepartmentBll);
            return(LoadSEPInfo.SetEmployeeAccountInfo(accountID, employee, _IAccountBll, _IDepartmentBll, _IPositionBll));
        }