End Sub
Private Sub txtJingdu_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtJingdu.KeyPress
If e.KeyChar >= "0" And e.KeyChar <= "9" Or e.KeyChar = Chr(Keys.Back) Or e.KeyChar = Chr(46) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtWeidu_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtWeidu.KeyPress
If e.KeyChar >= "0" And e.KeyChar <= "9" Or e.KeyChar = Chr(Keys.Back) Or e.KeyChar = Chr(46) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub btnMin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMin.Click
If txtStreet.Text = txtEnd.Text And txtEnd.Text <> "" Then
MessageBox.Show("起点和中点不能相同!")
Exit Sub
ElseIf txtEnd.Text = "" Or txtStreet.Text = "" Then
MessageBox.Show("街道名不能为空")
Exit Sub
End If
Dim strSql As String = "select * from road "
Dim strSql1 As String
Dim strSql2 As String
Dim i As Integer
Dim j As Integer
Dim p As Integer
Dim wm As Integer
Dim k As Integer
Dim n As Integer
Dim dr1 As System.Data.SqlClient.SqlDataReader
Dim ds As New DataSet
Dim dbobj As New ConnSqlServer.db
Dim dr As System.Data.SqlClient.SqlDataReader
dr = dbobj.DataReader(strSql)
While (dr.Read)
n = n + 1
End While
n = n + 1
751com.cn
For j = 0 To n
If g(i, j) = 0 Then
g(i, j) = 10000
End If
Next
Next
For i = 0 To n
For j = 0 To n
If i = j Then
g(i, j) = 0
End If
Next
Next
strSql1 = "select * from road where street_name =" & txtStreet.Text & ""
dr = dbobj.DataReader(strSql1)
If dr.Read Then
k = dr("e1id")
Else
MessageBox.Show("无此街道!")
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>