Dim cp As String = e.DataRow("产品名称")
Dim lx As Integer = e.DataRow("类型")
Dim ys As Integer = e.DataRow("叶数")
Dim zj As Integer = e.DataRow("直径")
Dim lj As Integer = e.DataRow("螺距")
Dim gnxh As String = e.DataRow("国内型号")
Dim c1 As String
Dim c2 As String
Dim c3 As String
Dim Values() As String
Select Case e.DataCol.Name
Case "产品名称"
If cp.IndexOf("-") >= 0 Then
Values = cp.split("-")
Dim x As Integer = Values.Length
If x = 2 Then
c1 = Values(0)
c2 = Values(1)
ElseIf x = 3 Then
c1 = Values(0)
c2 = Values(1)
c3 = Values(2)
End If
Dim Customers As List(Of String)
Customers = DataTables("参数设置").GetValues("B","[X] = \'产品参数\' and [A] = \'1S\'")
For Each Customer As String In Customers
If cp.StartsWith(Customer) = True Then
Dim dr As DataRow = DataTables("参数设置").Find("[X] = \'产品参数\' and [A] = \'1S\' and [B] = \'" & Customer & "\'")
If dr IsNot Nothing Then
e.DataRow("类型") = dr("J")
e.DataRow("叶数") = dr("K")
End If
End If
Next
If c2.StartsWith("SP") = True OrElse c2.StartsWith("PS") = True Then
gnxh = c1 & "-SP"
ElseIf c2.StartsWith("S") = True Then
gnxh = c1 & "-S"
ElseIf c2.StartsWith("P") = True Then
gnxh = c1 & "-P"
Else
gnxh = c1
End If
If c2.EndsWith("J") = True Then
gnxh = gnxh & "-J"
End If
gnxh = gnxh.ToUpper()
e.DataRow("国内型号") = gnxh
End If
End Select