Select Case e.DataCol.Name Case "年度", "个人状态","身份证号","本年度健康休养费" If e.DataRow("个人状态") = "现职" Then e.DataRow("上年度健康休养费") = Nothing Else Dim fdr8 As DataRow = e.DataTable.find("身份证号 = '" & e.DataRow("身份证号") & "'", "年度 DESC",1) Dim prp As DataRow = DataTables("原休养费").Find("身份证号 = '" & e.DataRow("身份证号") & "'") If fdr8 Is Nothing AndAlso prp IsNot Nothing Then e.DataRow("上年度健康休养费") = prp("年健康休养费") ElseIf fdr8 IsNot Nothing Then e.DataRow("上年度健康休养费") = fdr8("本年度健康休养费") End If End If End Select