private void HandleWelfareInfo() { if (_TheEmployeeToComplete.EmployeeWelfare == null) { EmployeeSocialSecurity employeeSocialSecurity = new EmployeeSocialSecurity(SocialSecurityTypeEnum.Null, null, null, null, null, null); EmployeeAccumulationFund employeeAccumulationFund = new EmployeeAccumulationFund(string.Empty, null, null, string.Empty, null); _TheEmployeeToComplete.EmployeeWelfare = new EmployeeWelfare(employeeSocialSecurity, employeeAccumulationFund); } CollectWelfareInfo(); }
/// <summary> /// 保存员工福利信息构造函数 /// </summary> public SaveEmployeeWelfare(int employeeID, SocialSecurityTypeEnum socialSecurityType, decimal?socialSecurityBase, DateTime?socialSecurityEffectiveYearMonth, string accumulationFundAccount, DateTime?accumulationFundEffectiveYearMonth, decimal?accumulationFundBase, string operationName, string accumulationFundSupplyAccount, decimal?accumulationFundSupplyBase, decimal?yangLaoBase, decimal?shiYeBase, decimal?yiLiaoBase) { _EmployeeID = employeeID; EmployeeSocialSecurity employeeSocialSecurity = new EmployeeSocialSecurity(socialSecurityType, socialSecurityBase, socialSecurityEffectiveYearMonth, yangLaoBase, shiYeBase, yiLiaoBase); EmployeeAccumulationFund employeeAccumulationFund = new EmployeeAccumulationFund(accumulationFundAccount, accumulationFundBase, accumulationFundEffectiveYearMonth, accumulationFundSupplyAccount, accumulationFundSupplyBase); _EmployeeWelfare = new EmployeeWelfare(employeeSocialSecurity, employeeAccumulationFund); _OperationName = operationName; }
private void CollectWelfareInfo() { EmployeeSocialSecurity employeeSocialSecurity = new EmployeeSocialSecurity(_ItsView.SocialSecurityType, EmployeeWelfare.ConvertToDecimal(_ItsView.SocialSecurityBase), EmployeeWelfare.ConvertToDateTime(_ItsView.SocialSecurityYearMonth), EmployeeWelfare.ConvertToDecimal(_ItsView.YangLaoBase), EmployeeWelfare.ConvertToDecimal(_ItsView.ShiYeBase), EmployeeWelfare.ConvertToDecimal(_ItsView.YiLiaoBase)); EmployeeAccumulationFund employeeAccumulationFund = new EmployeeAccumulationFund(_ItsView.AccumulationFundAccount, EmployeeWelfare.ConvertToDecimal(_ItsView.AccumulationFundBase), EmployeeWelfare.ConvertToDateTime(_ItsView.AccumulationFundYearMonth), _ItsView.AccumulationFundSupplyAccount, EmployeeWelfare.ConvertToDecimal(_ItsView.AccumulationFundSupplyBase)); _TheEmployeeToComplete.EmployeeWelfare = new EmployeeWelfare(employeeSocialSecurity, employeeAccumulationFund); }
public List <EmployeeWelfareHistory> GetEmployeeWelfareHistoryByAccountID(int employeeID) { List <EmployeeWelfareHistory> employeeWelfareHistoryList = new List <EmployeeWelfareHistory>(); SqlCommand cmd = new SqlCommand(); cmd.Parameters.Add(_AccountID, SqlDbType.Int).Value = employeeID; using (SqlDataReader sdr = SqlHelper.ExecuteReader("GetEmployeeWelfareHistoryByAccountID", cmd)) { while (sdr.Read()) { EmployeeSocialSecurity employeeSocialSecurity = new EmployeeSocialSecurity( SocialSecurityTypeEnum.GetById(Convert.ToInt32(sdr[_DbSocialSecurityType] ?? 0)), EmployeeWelfare.ConvertToDecimal(sdr[_DbSocialSecurityBase]), EmployeeWelfare.ConvertToDateTime(sdr[_DbSocialSecurityEffectiveYearMonth]), EmployeeWelfare.ConvertToDecimal(sdr[_DbYangLaoBase]), EmployeeWelfare.ConvertToDecimal(sdr[_DbShiYeBase]), EmployeeWelfare.ConvertToDecimal(sdr[_DbYiLiaoBase])); EmployeeAccumulationFund employeeAccumulationFund = new EmployeeAccumulationFund(EmployeeWelfare.ConvertToString(sdr[_DbAccumulationFundAccount]), EmployeeWelfare.ConvertToDecimal(sdr[_DbAccumulationFundBase]), EmployeeWelfare.ConvertToDateTime( sdr[_DbAccumulationFundEffectiveMonthYear]), EmployeeWelfare.ConvertToString( sdr[_DbAccumulationFundSupplyAccount]), EmployeeWelfare.ConvertToDecimal( sdr[_DbAccumulationFundSupplyBase])); EmployeeWelfare employeeWelfare = new EmployeeWelfare(employeeSocialSecurity, employeeAccumulationFund); EmployeeWelfareHistory employeeWelfareHistory = new EmployeeWelfareHistory(Convert.ToInt32(sdr[_DbPKID]), employeeWelfare, Convert.ToDateTime(sdr[_DbOperationTime]), sdr[_DbAccountsBackName].ToString()); employeeWelfareHistoryList.Add(employeeWelfareHistory); } } return(employeeWelfareHistoryList); }