前面4列一样,第五列自动一样 下面代码怎么修改呢?
Select Case e.DataCol.Name
Case "第一列","第二列","第三列","第四列","第五列"
Dim dr As DataRow = e.DataRow
If dr.IsNull("第一列") = False AndAlso dr.IsNull("第二列") =False AndAlso dr.IsNull("第三列") =False AndAlso dr.IsNull("第四列") =False Then
If e.DataTable.Select("第一列 = '" & dr("第一列") & "' And 第二列 = '" & dr("第二列") & "' And 第三列 = '" & dr("第三列") & "' And 第四列 = '" & dr("第四列") & "'") .Count > 1 Then
dr("第五列") = e.DataRow("第五列")
MessageBox.Show("前面4列一样,第五列自动一样了!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If
End Select
[此贴子已经被作者于2018/8/1 15:13:06编辑过]