Ejemplo n.º 1
0
        private static void RechieveItsPaper(AssessActivity assessActivity)
        {
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.Add(_AssessActivityID, SqlDbType.Int).Value =
                assessActivity.AssessActivityID;
            using (
                SqlDataReader sdr =
                    SqlHelper.ExecuteReader("GetAssessActivityPaperById", cmd))
            {
                while (sdr.Read())
                {
                    SubmitInfo submitInfo = new SubmitInfo();
                    submitInfo.Choose         = sdr[_DbChoseIntention].ToString();
                    submitInfo.Comment        = sdr[_DbContent].ToString();
                    submitInfo.FillPerson     = sdr[_DbFillPerson].ToString();
                    submitInfo.StepIndex      = Convert.ToInt32(sdr[_DbStepIndex]);
                    submitInfo.SubmitTime     = Convert.ToDateTime(sdr[_DbSubmitTime]);
                    submitInfo.SalaryNow      = EmployeeWelfare.ConvertToDecimal(sdr[_DbSalaryNow]);
                    submitInfo.SalaryChange   = EmployeeWelfare.ConvertToDecimal(sdr[_DbSalaryChange]);
                    submitInfo.SubmitInfoType =
                        SubmitInfoType.RechieveSubmitInfoTypeByID(Convert.ToInt32(sdr[_DbType]));
                    assessActivity.ItsAssessActivityPaper.SubmitInfoes.Add(submitInfo);

                    int paperID = Convert.ToInt32(sdr[_DbPKID]);
                    submitInfo.SubmitInfoID = paperID;
                    RechieveItsSubmitInfo(paperID, submitInfo);
                }
            }
        }
 private static decimal?ConvertToDecimal(string s)
 {
     if (!string.IsNullOrEmpty(s))
     {
         decimal temp;
         if (!decimal.TryParse(s, out temp))
         {
             throw new ApplicationException(string.Format("数据:{0} 格式错误", s));
         }
     }
     return(EmployeeWelfare.ConvertToDecimal(s));
 }
Ejemplo n.º 3
0
 public static SubmitInfo Convert(AssessActivityPaperEntity entity)
 {
     return(new SubmitInfo
     {
         Choose = entity.ChoseIntention,
         Comment = entity.Content,
         FillPerson = entity.FillPerson,
         StepIndex = entity.StepIndex.GetValueOrDefault(),
         SubmitTime = entity.SubmitTime,
         SalaryNow = EmployeeWelfare.ConvertToDecimal(entity.SalaryNow),
         SalaryChange = EmployeeWelfare.ConvertToDecimal(entity.SalaryChange),
         SubmitInfoType = SubmitInfoType.RechieveSubmitInfoTypeByID(entity.Type),
         SubmitInfoID = entity.PKID,
         AssessActivityID = entity.AssessActivityID
     });
 }
Ejemplo n.º 4
0
        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);
        }