Dim cs1() As String = {"介质名称","螺杆数量"} Dim cs2() As String = {"介质名称","螺杆轴数量"} Dim idx As Integer = array.indexof(cs1, e.DataCol.name) If idx >= 0 Then Dim dr = DataTables("泵电机参数").Find(cs2(idx) & " = '" & e.NewValue & "'") Dim n1 As String = cs2(idx) & "英文" Dim n2 As String = cs2(idx) & "代码" If dr Is Nothing Then If e.DataTable.datacols.contains(n1) Then e.DataRow(n1) = Nothing If e.DataTable.datacols.contains(n2) Then e.DataRow(n2) = Nothing Else If e.DataTable.datacols.contains(n1) Then e.DataRow(n1) = dr(n1) If e.DataTable.datacols.contains(n2) Then e.DataRow(n2) = dr(n2) End If End If
|