Select Case e.DataCol.name
Case "父亲姓名","母亲姓名"
Dim dr As DataRow = e.DataRow
If dr.IsNull("父亲姓名") = False AndAlso dr.IsNull("母亲姓名") = False Then
Dim cmd As New SQLCommand
Dim dt As DataTable
cmd.C
cmd.CommandText ="Select b.[_Identify],父亲姓名,母亲姓名,拒收原因 * {学生基本信息} a Inner JOIN {拒收学生} b ON a.学生编号 = b.学生编号 WHERE 报名审批 = '拒收' and 父亲姓名 = '" & dr("父亲姓名") & "' And 母亲姓名 = '" & dr("母亲姓名") & "'"
dt = cmd.ExecuteReader()
If dt.DataRows.Count > 0 Then
MessageBox.Show(dr("学生姓名") & dt.DataRows(0)("拒收原因") & "!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.DataRow(e.DataCol.Name) = e.OldValue '取消输入
End If
End If
End Select