Dim Vals As List(of String())
Vals = DataTables("路线卡明细").GetValues("零部件图号|工序|车间|工序单价")
For i As Integer = 0 To Vals.Count - 1
Dim m As Double
If Vals(i)(3) <> "" Then
m= vals(i)(3)
End If
If m > 0 Then
Dim n As String = vals(i)(2)
If n = "数控" Then
Dim dr As DataRow = DataTables("工价表").AddNew()
dr("零部件图号") = Vals(i)(0)
dr("工序") = Vals(i)(1)
dr("数控") = Vals(i)(3)
Else
Dim dr As DataRow = DataTables("工价表").AddNew()
dr("零部件图号") = Vals(i)(0)
dr("工序") = Vals(i)(1)
If Vals(i)(3) <> "" Then
dr("单价") = Val(Vals(i)(3))
End If
End If
End If
Next