1
Dim lb2 As WinForm.Label = e.Form.Controls("Label2")
2
Dim p As WinForm.ProgressBar
3
p = e.Form.Controls("ProgressBar1")
4
p.Maximum = DataTables("xjkh_lwg").DataRows.Count
5
p.Minimum = 0 '设置最小值
6
p.Value = 0 '设置当前值
7
lb2.Text = "正在分析数据……"
8
Dim Arys As List(Of String())
9
Arys = DataTables("dtgk_lwg").GetValues("使用车站|电梯编号|巡检点1|巡检点2")
10
MainTable = Tables("xjkh_lwg")
SystemReady = False
11
For Each dr As DataRow In DataTables("xjkh_lwg").DataRows
13
For Each Ary As String() In Arys
14
If dr("使用车站") = ary(0) And (dr("placename") = ary(2) Or dr("placename") = ary(3)) Then '如果等于使用车站和巡检点1
15
dr("dtcode") = ary(1)
16
dr("xjsx") = ary(2) & "," & ary(3)
17
End If
18
Next
19
p.Value = p.Value + 1
20 lb2.Text = lb2.text & p.Value & "/" & p.Maximum
Application.DoEvents
21
Next
SystemReady = True