Imports Gates.MES.BL
Imports Gates.MES.DA
Public Class splitJob
Dim _bl As BL.QueyUpdate
Dim _dbTrans As DBTransaction
Dim _connec As String = BL.clsMain.CONNECTIONSTRING
Private Sub ButtonSplit_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles ButtonSplit.Click
_dbTrans = New DBTransaction(_connec)
_bl = New BL.QueyUpdate(_dbTrans)
Dim sJ As New BL.SplitJob
sJ.OriginalJob = TextBox1.Text
sJ.NewJob = TextBox2.Text
sJ.NewQty = TextBox3.Text
_bl.InsertSpliJob(sJ)
End Sub
End Class
Imports System.Threading
Public Class ctrMulti
Dim runThread As Thread
Dim i As Double
Dim str As String
Private Sub Multi_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
run()
End Sub
Private Sub run()
While True
str = "正在运行"
i = i + 1.345
i = i * 1.23425
i = i / 1.23425
i = i - 1.345
End While
End Sub
Private Sub Button2_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button2.Click
runThread = New Thread(AddressOf run)
runThread.Start()
str = i.ToString
End Sub
Private Sub Button3_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button3.Click
MsgBox("i=" + i.ToString)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button4.Click runThread.Abort() str = "结束" End Sub End Class