List <EmployeeInfo> GetEmployeeList() { //上月期间开始 DateTime date = SalaryResult.GetLastSalaryDate(group); //2018-7-11 获取软件开发人员 List <EmployeeInfo> developer_list = new List <EmployeeInfo>(); List <string> names = Developer.GetDeveloperList(); foreach (string name in names) { EmployeeInfo emp = EmployeeInfo.GetEmployeeInfoByName(name); if (emp != null) { developer_list.Add(emp); } } List <EmployeeInfo> emp_list = new List <EmployeeInfo>(); if (jobgrade != null) { if (salary_plan == "软件开发") { emp_list = developer_list; } else { //先将在职员工信息加载到内存 EmployeeInfo.GetEmployeeList(company_code, group, true); //获取上月工资表中的人员名单 emp_list = SalaryResult.GetEmployeeList(date.Year, date.Month, company_code, group, !check包括离职人员.Checked); //剔除软件开发人员 foreach (EmployeeInfo emp in developer_list) { emp_list.RemoveAll(a => a.员工编号 == emp.员工编号); } } } else { if (group == "管培生") { //先将在职员工信息加载到内存 EmployeeInfo.GetEmployeeList(company_code, null, true); //获取上月工资表中的人员名单 emp_list = SalaryResult.GetEmployeeList(date.Year, date.Month, company_code, null, !check包括离职人员.Checked); //移除非管培生 emp_list.RemoveAll(a => a.是管培生 == false); } else { string[] grade_list = null; if (group == "副总经理以上") { grade_list = 副总经理以上职等.Split(new char[] { ',' }); } if (grade_list != null) { for (int i = 0; i < grade_list.Length; i++) { //先将在职员工信息加载到内存 EmployeeInfo.GetEmployeeList(company_code, group, true); //获取上月工资表中的人员名单 List <EmployeeInfo> emps = SalaryResult.GetEmployeeList(date.Year, date.Month, company_code, grade_list[i], !check包括离职人员.Checked); emp_list.AddRange(emps); } } } //剔除软件开发人员 foreach (EmployeeInfo emp in developer_list) { emp_list.RemoveAll(a => a.员工编号 == emp.员工编号); } } //如果不是管培生组,剔除管培生 if (group != "管培生") { emp_list.RemoveAll(a => a.是管培生); } return(emp_list); }