Select Case e.DataCol.Name
Case "规格","封装"
If dr("规格") = Nothing And dr("封装") = Nothing Then
dr("查找列")= ""
Else
dr("查找列")=dr("规格") & "|" & dr("封装")
End If
' MessageBox.Show(dr("查找列"))
If dr.IsNull("规格") = False AndAlso dr.IsNull("封装") = False Then
Dim dr1 As DataRow = e.DataTable.Find("规格 ='" & dr("规格") & "' and 封装 ='" & dr("封装") & "'")
If dr1 IsNot Nothing Then
MessageBox.Show(dr("规格") & "|" & dr("封装") & ":已有相同的物料封装")
dr.Delete
End If
End If