/// <summary> /// 查询 /// </summary> public void ExecutEvent(string letter) { if (!ValidateFrom() || !ValidateTo()) { } else { try { _View.ErrorMessage = string.Empty; EmployeeTypeEnum employeetype = EmployeeTypeUtility.GetEmployeeTypeByID(Convert.ToInt32(_View.EmployeeType)); //_EmployeeList = // _IEmployeeFacade.GetEmployeeByBasicConditionAndFirstLetter(_View.EmployeeName, employeetype, // _View.PositionId, _View.DepartmentId, // _View.RecursionDepartment, // letter); //20090807 修改查询条件 by liudan _EmployeeList = _IEmployeeFacade.GetEmployeeByBasicConditionWithFirstLetterAndCompanyAge(_View.EmployeeName, employeetype, _View.PositionId, _View.DepartmentId, _View.RecursionDepartment, letter, AgeFrom, AgeTo, Convert.ToInt32(_View.EmployeeStatusId)); _EmployeeList = HrmisUtility.RemoteUnAuthEmployee(_EmployeeList, AuthType.HRMIS, _Operator, HrmisPowers.A401); List <Employee> emplyees = new List <Employee>(); foreach (Employee emplyee in _EmployeeList) { //根据所属公司id,得到所属公司名称 Employee temp = emplyee; if (temp.EmployeeDetails == null || temp.EmployeeDetails.Work == null || temp.EmployeeDetails.Work.Company == null) { } else { //todo noted by wsl transfer waiting for modify temp.EmployeeDetails.Work.Company = _IDepartmentBll.GetDepartmentById( temp.EmployeeDetails.Work.Company.Id, new Account()); } temp.EmployeeDetails = temp.EmployeeDetails ?? new EmployeeDetails(); temp.EmployeeDetails.Work = temp.EmployeeDetails.Work ?? new Work(); temp.EmployeeDetails.Work.Company = temp.EmployeeDetails.Work.Company ?? new Department(); emplyees.Add(temp); } _CardView.Employees = emplyees; _View.ErrorMessage = "<span class='font14b'>共查到 </span>" + "<span class='fontred'>" + _EmployeeList.Count + "</span>" + "<span class='font14b'> 条信息</span>"; } catch (Exception ex) { _View.ErrorMessage = "<span class='fontred'>" + ex.Message + "</span>"; } } }