If MainTable.Name = "OrderList" Then
If DataTables("OrderList").DataRows.Count > 0 Then '如果订单表没有数据
Dim ids As String
For Each dr As DataRow In DataTables("OrderList").DataRows
ids = ids & "," & "'" & dr("OrderID") & "'"
Next
ids= ids.Trim(",")
'MessageBox.show(ids)
DataTables("BagRegList").LoadFilter = "OrderID In (" & ids & ")"
DataTables("NoteList").LoadFilter = "OrderID In (" & ids & ")"
DataTables("OrderColorSize").LoadFilter = "OrderID In (" & ids & ")"
DataTables("OrderFabricPlan").LoadFilter = "OrderID In (" & ids & ")"
DataTables("OrderMaterialPlan").LoadFilter = "OrderID In (" & ids & ")"
DataTables("OrderProductPlan").LoadFilter = "OrderID In (" & ids & ")"
DataTables("OrderProductProcess").LoadFilter = "OrderID In (" & ids & ")"
DataTables("RecordBagList").LoadFilter = "OrderID In (" & ids & ")"
DataTables("RecordList").LoadFilter = "OrderID In (" & ids & ")"
DataTables("CutRecord").LoadFilter = "OrderID In (" & ids & ")"
DataTables("CutRecordProcessWorker").LoadFilter = "OrderID In (" & ids & ")"
DataTables("CutRecordFabricList").LoadFilter = "OrderID In (" & ids & ")"
'---------------------
StatusBar.Message1= "正在加载订单表及对应子表"
StatusBar.ProgressBar.Visible =True
StatusBar.Refresh
DataTables("BagRegList").Load()
StatusBar.ProgressBar.Value = 8
StatusBar.Message2= "8%"
StatusBar.Refresh
DataTables("NoteList").Load()
StatusBar.ProgressBar.Value = 16
StatusBar.Message2= "16%"
StatusBar.Refresh
DataTables("OrderColorSize").Load()
StatusBar.ProgressBar.Value = 24
StatusBar.Message2= "24%"
StatusBar.Refresh
DataTables("OrderFabricPlan").Load()
StatusBar.ProgressBar.Value = 32
StatusBar.Message2= "32%"
StatusBar.Refresh
DataTables("OrderMaterialPlan").Load()
StatusBar.ProgressBar.Value = 40
StatusBar.Message2= "40%"
StatusBar.Refresh
DataTables("OrderProductPlan").Load()
StatusBar.ProgressBar.Value = 48
StatusBar.Message2= "48%"
StatusBar.Refresh
DataTables("OrderProductProcess").Load()
StatusBar.ProgressBar.Value = 56
StatusBar.Message2= "56%"
StatusBar.Refresh
DataTables("RecordBagList").Load()
StatusBar.ProgressBar.Value = 64
StatusBar.Message2= "64%"
StatusBar.Refresh
DataTables("RecordList").Load()
StatusBar.ProgressBar.Value = 72
StatusBar.Message2= "72%"
StatusBar.Refresh
DataTables("CutRecord").Load()
StatusBar.ProgressBar.Value = 80
StatusBar.Message2= "80%"
StatusBar.Refresh
DataTables("CutRecordProcessWorker").Load()
StatusBar.ProgressBar.Value = 88
StatusBar.Message2= "88%"
StatusBar.Refresh
DataTables("CutRecordFabricList").Load()
StatusBar.ProgressBar.Value = 100
StatusBar.Message2= "100%"
StatusBar.Refresh
StatusBar.Reset()
End If
End If