Tables("窗口1_table1").DataSource =dtb.BuildDataSource()
Tables("窗口1_table1").DataSource =DataTables("统计")
请问一下这上面两句代码有什么区别?
(全局表事件代码)
If e.DataTable.Name ="窗口1_table1" Then
Case "型号","规格"
Dim dr As DataRow = e.DataRow
If dr.IsNull("型号") = False AndAlso dr.IsNull("规格") = False Then
If e.DataTable.Compute("Count([_Identify])","型号 = '" & dr("型号") & "' And 规格 = '" & dr("规格") & "'") > 1 Then
MessageBox.Show("已经存在相同型号和规格的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue '取消输入
End If
End If
end if
为什么使用第一件下面这段代码会提示,使用第二句下面那段代码没反应?
[此贴子已经被作者于2014-7-21 15:32:20编辑过]