--
Select Case e.DataCol.name
Case "学号"
Dim dr As DataRow = DataTables("成绩表").Find("学号 = \'" & e.OldValue & "\'")
If dr IsNot Nothing Then
dr("学号") = e.DataRow("学号")
Else
dr = DataTables("成绩表").Find("学号 = \'" & e.newValue & "\'")
If dr Is Nothing Then
dr = DataTables("成绩表").AddNew()
dr("学号") = e.DataRow("学号")
dr("年级") = e.DataRow("年级")
dr("班级") = e.DataRow("班级")
dr("姓名") = e.DataRow("姓名")
dr("语文") = e.DataRow("语文")
dr("数学") = e.DataRow("数学")
dr("英语") = e.DataRow("英语")
dr("物理") = e.DataRow("物理")
dr("化学") = e.DataRow("化学")
dr("总分") = e.DataRow("总分")
End If
End If
Case "年级","班级","姓名","语文","数学","英语","物理","化学","总分"
Dim dr As DataRow = DataTables("成绩表").Find("学号 = \'" & e.DataRow("学号") & "\'")
If dr IsNot Nothing Then
dr(e.DataCol.Name) = e.DataRow(e.DataCol.Name)
End If
End Select