If Tables("网络校车基本信息表").Rows.count > 0 Then '求行数
Dim frm As WinForm.Form
frm = Forms.ActiveForm
If frm IsNot Nothing Then
If frm.Name = "校车管理窗体" Then
If CurrentTable.DataTable.Name = "网络校车基本信息表" Then
If e.DataCol.Name = "驾驶员_身份证号" And e.DataRow("统计项目") = "驾驶人员" Then
For Each dr5 As DataRow In DataTables("网络校车基本信息表").Select(" 统计项目 <> '驾驶人员' ","")
If dr5("驾驶员_身份证号") = e.oldvalue Then
dr5("驾驶员_身份证号") = e.newvalue
End If
Next
End If
msgbox(e.DataRow("统计项目")) '能不能弹出来
'-- 在驾驶员从【在岗】改为【离岗】后,【统计项目】符合线路配置各行中,该驾驶员的身份证号全部清空
If e.DataCol.Name = "车辆_状态" And e.DataRow("统计项目") = "驾驶人员" Then
msgbox(e.NewValue)'弹出什么值
If e.NewValue <> "运行" Then
Dim 身份证号 As String = e.DataRow("驾驶员_身份证号")
Dim dr5 As DataRow = DataTables("网络校车基本信息表").Find(" 统计项目 <> '驾驶人员' and 驾驶员_身份证号 = '" & 身份证号 & "'")
dr5("驾驶员_身份证号") = ""
End If
End If
Dim 设置下拉菜单 As WinForm.Button = Forms("校车管理窗体").Controls("设置下拉菜单")
设置下拉菜单.PerformClick()
End If
End If
End If
End If