Dim frm As WinForm.Form = Forms.ActiveForm
If frm IsNot Nothing Then
frm.ResumeRedraw
End If
If Forms("数据加载中").Opened = False Then
Forms("数据加载中").show
End If
If frm IsNot Nothing Then
frm.StopRedraw
End If
Application.DoEvents()
Dim tab As WinForm.TabControl = e.Form.Controls("TabControl1")
tab.TabPages.Clear
With Tables("流转状态")
.Sort = "排序 ASC"
For idx As Integer = 0 To .Rows.Count - 1
Dim tp As WinForm.TabPage = tab.TabPages.Add(tab.Name & .Rows(idx).DataRow("_Identify"),.Rows(idx)("名称"))
If .Rows(idx)("显示") = 1 Then
tp.Visible = False
Continue For
End If
Dim tbl As WinForm.Table
tbl = e.Form.CreateSQLTable(tab.Name & .Rows(idx).DataRow("_Identify"), "Select 任务编号 , 订单号 ,发布时间 From 任务 Where 状态编号 = " & .Rows(idx).DataRow("_Identify") & " And QQ = '" & QQ & "'",Vars("Data"))
tbl.Dock = Windows.Forms.DockStyle.Fill
tp.AddControl(tbl)
If Tables.Contains(e.Form.Name & "_" & tp.Name) Then
With Tables( e.Form.Name & "_" & tp.Name )
.DataTable.GlobalHandler.BeforeShowContextMenu = True
.Cols("订单号").Visible = False
.AllowEdit = False
Functions.Execute("设置表格自定义样式", .Name )
End With
End If
Next
End With
tab.Visible = True
If frm IsNot Nothing Then
frm.ResumeRedraw
End If
If Forms("数据加载中").Opened Then
Forms("数据加载中").Close
End If