For Each dr As DataRow In DataTables("表B").Select("企业名称>''") Dim drs As List(of DataRow) = DataTables("表A").Select("企业名称='" & dr("企业名称") & "'") If drs.Count = 0 drs = DataTables("表A").Select("企业名称='通用'") End If If drs.Count > 0 For Each fdr As DataRow In drs If dr("风险值") >= fdr("R1") AndAlso dr("风险值") <= fdr("R2") dr("风险等级") = fdr("风险等级") dr("风险级别") = fdr("风险级别") dr("管控层级") = fdr("管控层级") Exit For End If Next End If Next
|