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); } } }
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 }); }