private void Import(DataTable dt) { List <EmployeeWelfare> employeeWelfarelist = new List <EmployeeWelfare>(); List <Employee> employeeList = new GetEmployee().GetEmployeeBasicInfoByBasicCondition("", EmployeeTypeEnum.All, -1, -1, true, -1); employeeList = HrmisUtility.RemoteUnAuthEmployee(employeeList, AuthType.HRMIS, _Operator, HrmisPowers.A605); if (employeeList != null) { foreach (Employee employee in employeeList) { EmployeeWelfare welfare = _DalEmployeeWelfare.GetEmployeeWelfareByAccountID(employee.Account.Id); if (welfare == null) { welfare = EmployeeWelfare.EmptyWelfare(); } welfare.Owner = employee.Account; employeeWelfarelist.Add(welfare); } } ValueItemsAndSave(employeeWelfarelist, dt); }
private void SearchEmployeeWelfare() { try { List <EmployeeWelfare> employeeWelfarelist = new List <EmployeeWelfare>(); //List<Employee> employeeList = // _IEmployeeFacade.GetEmployeeBasicInfoByBasicCondition(_View.EmployeeName, _View.EmployeeType, // _View.PositionId, _View.DepartmentId, // _View.RecursionDepartment, // Convert.ToInt32(_View.EmployeeStatusId), // _View.CompanyId); //employeeList = // HrmisUtility.RemoteUnAuthEmployee(employeeList, AuthType.HRMIS, _Operator, HrmisPowers.A605); List <Employee> employeeList = EmployeeLogic.GetEmployeeBasicInfoByBasicConditionRetModel(_View.EmployeeName, _View.EmployeeType, _View.PositionId, null, _View.DepartmentId, _View.CompanyId, _View.RecursionDepartment, HrmisPowers.A605, _Operator.Id, Convert.ToInt32(_View.EmployeeStatusId), null); if (employeeList != null) { foreach (Employee employee in employeeList) { EmployeeWelfare welfare = _IEmployeeWelfareFacade.GetEmployeeWelfareByAccountID(employee.Account.Id); if (welfare == null) { welfare = EmployeeWelfare.EmptyWelfare(); } welfare.AccumulationFund.BaseTemp = welfare.AccumulationFund.Base == null ? "" : welfare.AccumulationFund.Base.ToString(); welfare.AccumulationFund.SupplyBaseTemp = welfare.AccumulationFund.SupplyBase == null ? "" : welfare.AccumulationFund.SupplyBase.ToString(); welfare.SocialSecurity.BaseTemp = welfare.SocialSecurity.Base == null ? "" : welfare.SocialSecurity.Base.ToString(); welfare.SocialSecurity.YangLaoBaseTemp = welfare.SocialSecurity.YangLaoBase == null ? "" : welfare.SocialSecurity.YangLaoBase.ToString(); welfare.SocialSecurity.ShiYeBaseTemp = welfare.SocialSecurity.ShiYeBase == null ? "" : welfare.SocialSecurity.ShiYeBase.ToString(); welfare.SocialSecurity.YiLiaoBaseTemp = welfare.SocialSecurity.YiLiaoBase == null ? "" : welfare.SocialSecurity.YiLiaoBase.ToString(); welfare.AccumulationFund.EffectiveYearMonthTemp = EmployeeWelfare.YearAndMonth(welfare.AccumulationFund.EffectiveYearMonth); welfare.SocialSecurity.EffectiveYearMonthTemp = EmployeeWelfare.YearAndMonth(welfare.SocialSecurity.EffectiveYearMonth); welfare.Owner = employee.Account; employeeWelfarelist.Add(welfare); } } _View.EmployeeWelfareList = employeeWelfarelist; _View.Message = string.Format( "<span class='font14b'>共查到 </span><span class='fontred'>{0}</span><span class='font14b'> 条信息</span>", employeeList == null ? 0 : employeeList.Count); } catch (Exception ex) { _View.Message = string.Format("<span class='fontred'>{0}</span>", ex.Message); } }