Professional Documents
Culture Documents
Transporte Transporte: ( Not Null, Not Null, Not Null, Not Null, Not Null, Not Null, Not Null)
Transporte Transporte: ( Not Null, Not Null, Not Null, Not Null, Not Null, Not Null, Not Null)
Imports System
Imports System.Data.SqlClient
Public Class Form1
Dim conexion As New SqlConnection
Dim comando As New SqlCommand
Dim v As Char
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Try
conexion.ConnectionString = ("Data Source=SANTI-PC\SQLEXPRESS;Initial
Catalog=Transporte;Integrated Security=True")
conexion.Open()
comando.Connection = conexion
MsgBox("BIENVIENIDO", MsgBoxStyle.Information)
Catch ex As Exception
MsgBox("ERROR EN LA CONEXION CON LA BASE DE DATOS", MsgBoxStyle.Critical)
End Try
End Sub
End Sub
Private Sub cboDestino_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cboDestino.SelectedIndexChanged
Dim d As String
d = cboDestino.Text
Select Case d
Case "Juliaca"
lblPago.Text = 15
Case "Puno"
lblPago.Text = 20
Case "Tacna"
lblPago.Text = 20
Case "Cuzco"
lblPago.Text = 75
Case "Lima"
lblPago.Text = 60
End Select
End Sub
End Sub
End Class