Dim rr As Row = Tables("订单查询_订单表").Current
Dim filter As String = "合同号 = '" & rr("合同号") & "' And 款号 = '" & rr("款号") & "'"
Dim filters As String = "合同号 = '" & rr("合同号") & "'And 款号 = '" & rr("款号") & "' And 业务担当 = '" & rr("业务担当") & "' And 合同交期 = '" & rr("合同交期") & "' And 客户名称 = '" & rr("客户名称") & "' And 品名 = '" & rr("品名") & "' And 合同数量 = '" & rr("合同数量") & "' "
Dim cmd As New SQLCommand
Dim ds0 As DataTable
Dim ds1 As DataTable
Dim ds2 As DataTable
Dim ds3 As DataTable
Dim ds4 As DataTable
Dim ds5 As DataTable
Dim cmb As WinForm.ComboBox
cmd.C
cmd.CommandText = "SELEC1T * From {订单主表}"
ds0 = cmd.ExecuteReader()
cmd.CommandText = "SELEC1T * From {订单数量明细}"
ds1= cmd.ExecuteReader()
cmd.CommandText = "SELEC1T * From {配色表}"
ds2 = cmd.ExecuteReader()
cmd.CommandText = "SELEC1T * From {订单辅料明细}"
ds3= cmd.ExecuteReader()
cmd.CommandText = "SELEC1T * From {订单面料明细}"
ds4 = cmd.ExecuteReader()
cmd.CommandText = "SELEC1T * From {面料委托表}"
ds5 = cmd.ExecuteReader()
Dim drZ As List(Of DataRow) = ds0.Selec1t(filters)
Dim drs As List(Of DataRow) = ds1.Selec1t(filter)
Dim drp As List(Of DataRow) = ds2.Selec1t(filter)
Dim drf As List(Of DataRow) = ds3.Selec1t(filter)
Dim drm As List(Of DataRow) = ds4.Selec1t(filter)
Dim dtm As List(Of DataRow) = ds5.Selec1t(filter)
For Each dr As DataRow In drp
dr.Delete()
Next
For Each dr As DataRow In drs
dr.Delete()
ds1.Save()
Next
For Each dr As DataRow In drf
dr.Delete()
ds2.Save()
Next
For Each dr As DataRow In drm
dr.Delete()
ds3.Save()
Next
For Each dr As DataRow In drZ
dr.Delete()
ds4.Save()
Next
For Each dr As DataRow In dtm
dr.Delete()
ds5.Save()
Next