private void addCheckHistory(List<int> lstApplyNo) { List<CommonServiceLibrary.Lis_Result> lstresult = new List<CommonServiceLibrary.Lis_Result>(); ADDTION_CHECK_HISTORY checkEntity = new ADDTION_CHECK_HISTORY(); try { for(int i=0;i<lstApplyNo.Count;i++) { lstresult = cs.GetDataLisResult("where applyno=@0", new object[] { lstApplyNo[i] }).ToList(); if (lstresult.Count <= 0) continue; for(int j=0;j<lstresult.Count;j++) { string itemCode = ConfigurationManager.AppSettings[lstresult[j].ItemCode.ToLower().Trim()]; Type entityType = checkEntity.GetType(); PropertyInfo propertyInfo = entityType.GetProperty(NullConvertString(itemCode).ToUpper()); if (propertyInfo == null) continue; propertyInfo.SetValue(checkEntity, lstresult[j].ResultValue, null); } checkEntity.BASE_INFO_ID = _id; checkEntity.LOG_TIME = DateTime.Now; checkEntity.OPERATOR = ClsFrmMng.WorkerID; checkEntity.BLOOD = lstresult[0].ResultTime; checkEntity.APPLYNO = lstApplyNo[i]; exdb.Insert(checkEntity); //checkEntity.Insert(); } } catch (Exception err) { XtraMessageBox.Show(err.Message, "错误提示", MessageBoxButtons.OK); } }