Select Case e.DataCol.Name Case "发货确认" If e.NewValue = True Then Dim dr As DataRow = DataTables("产品表").Find("编码 = '" & e.DataRow("编码") & "'and 批次 = '" & e.DataRow("批次") & "'") If dr Is Nothing Then MessageBox.Show("无相关产品") e.DataRow("发货确认") = e.OldValue End If End If End Select
|