现有一个部门岗位表,表里有部门体系,部门名称,办事处,职务岗位,职别,职级,职系等字段,
现在想要在窗口中实现“当连级选择完部门体系,部门名称,办事处,职务岗位以后,职别,职级,职系的值自动填上”
窗口中绑定的员工表,我在员工表的DataColChanged事件中写入以下代码:
If e.DataCol.Name = "职务岗位" Then
If e.DataRow.IsNull("职务岗位") Then
e.DataRow("职别") = Nothing
e.DataRow("职级") = Nothing
e.DataRow("职系") = Nothing
Else
Dim dr As DataRow = DataTables("部门岗位").Find ( "部门体系 = '" & e.DataRow("部门体系") & "' and 部门名称 = '" & e.DataRow("工作部门") & "' and 办事处 = '" & e.DataRow("办事处") & "' And 岗位名称 = '" & e.DataRow("职务岗位") & "'" )
e.DataRow("职别") = dr("职别")
e.DataRow("职级") = dr("职级")
e.DataRow("职系") = dr("职系")
End If
End If
但是在操作时会报以下错误,并且程序崩溃,请老师帮我看看哪有问题啊

此主题相关图片如下:qq截图20140701091906.png
