Anda di halaman 1dari 35

PEMROGRAMAN KOMPUTER

Ahmad Muhsin, S.T., M.Eng

Disusun oleh :

Kelas : C

1. Sarah
2. Siregar Romauli Artha 122140091
3. Bayu Setianto 122140
4. Amelina Octaviani 122140140
5. Astrid Septiana 122140

PROGRAM STUDI TEKNIK INDUSTRI

FAKULTAS TEKNOLOGI INDUSTRI

UNIVERSITAS PEMBANGUNAN NASIONAL VETERAN

YOGYAKARTA

2017
1. Form
Form Selamat Datang

Gambar 1 Form Selamat Datang

Tabel 1 Properties toolbox form Selamat Datang


Object Properties Nilai
Form1 Name Form1
Text Selamat Datang
Label1 Name Label1
Text SELAMAT DATANG
Font Monotype Corsiva; 26pt
Back Color Transparent
Label2 Name Label2
Text EFISIENSI BUS AND
TRAVEL
Font Comic Sans MS ; 20pt
Back Color Transparent
Label3 Name Label3
Text 0287 384444
Back Color Transparent
Label4 Name Label4
Text efisiensi@email.com
Back Color Transparent

2
Tabel 1 Lanjutan
Object Properties Nilai
Label5 Name Label5
Text @efisiensi
Back Color Transparent
GroupBox1 Name GroupBox1
Text MORE INFORMATION
Font Microsoft Sans Serif, 14pt
Back Color Transparent
PictureBox1 Name PictureBox1
PictureBox2 Name PictureBox2
PictureBox3 Name PictureBox3
Panel1 Name Panel1
Back Color Transparent
Timer1 Name Timer1
Interval 100
Enabled True
Button1 Name btnInfo
Text Informasi
Font Lucida Calligraphy, 12pt
Button2 Name Btn Pesan
Text PESAN
Font Monotype Corsiva; 14pt

Form Pilih Armada

Gambar 2 Form Pilih Armada

3
Tabel 2 Properties toolbox form Pilih Armada
Object Properties Nilai
Form2 Name Form2
Text Pilih Armada
Label1 Name Label1
Text PILIH ARMADA
Font Microsoft Sans Serif; 20pt
Label2 Name Label2
Text TRAVEL
Font Microsoft Sans Serif; 10pt
Label3 Name Label3
Text BUS
Font Microsoft Sans Serif; 10pt
Button1 Name btnTravel
Button2 Name btnBus

Form Data Penumpang Travel

Gambar 3 Form Data Penumpang Travel

4
Tabel 3 Properties toolbox form Data Penumpang Travel
Object Properties Nilai
Form3 Name Form3
Text Data Penumpang Travel
Label1 Name Label1
Text Nama
Label2 Name Label2
Text No. KTP
Label3 Name Label3
Text No HP
Label4 Name Label4
Text Tanggal Keberangkatan
Label5 Name Label5
Text Alamat
Label6 Name Label6
Text Kota Tujuan
Label7 Name Label6
Text Jumlah
Label8 Name Label8
Text Harga
TextBox1 Name txtnama
TextBox2 Name txtNoKTP
TextBox3 Name txtNoHP
TextBox4 Name txtalamat
TextBox5 Name txtHarga
DateTimePicker Name dtpTanggal
ListBox1 Name lstTujuan
ComboBox1 Name cmbJumlah
DataGridView1 Name DataGridView1
Button1 Name btnSimpan
Button2 Name btnHapus
Button3 Name btnBatal
Button4 Name btnHitung
Button5 Name btnHome

5
Form Data Penumpang Bus

Gambar 4 Form Data Penumpang Bus

Tabel 4 Properties toolbox form Data Penumpang Bus


Object Properties Nilai
Form3 Name Form3
Text Data Penumpang Bus
Label1 Name Label1
Search
Monotype Corsiva; 14pt
TextBox1 Name txtnama
TextBox2 Name txtrekam
Button1 Name btnKembali

6
Form Informasi

Gambar 5 Form Informasi

Tabel 5 Properties toolbox form Informasi


Object Properties Nilai
Form5 Name Form5
Text Informasi
Label1 Name Label1
Text Web
TextBox1 Name txtWeb
WebBrowser1 Name WebBrowser1
Button1 Name btnRefresh
Button2 Name btnHome

7
Form Penumpang Bus

Gambar 6 Form Penumpang Bus

Tabel 6 Properties toolbox form Penumpang Bus


Object Properties Nilai
Form6 Name Form6
Text Penumpang Bus
Label1 Name Label1
Text Nama
Label2 Name Label2
Text No. KTP
Label3 Name Label3
Text No HP

8
Tabel 6 Lanjutan
Object Properties Nilai
Label4 Name Label4
Text Tanggal Keberangkatan
Label5 Name Label5
Text Alamat
Label6 Name Label6
Text Kategori
Label7 Name Label7
Text Kota Tujuan
Label8 Name Label6
Text Jumlah
Label9 Name Label8
Text Harga
TextBox1 Name txtnama
TextBox2 Name txtNoKTP
TextBox3 Name txtNoHP
TextBox4 Name txtalamat
TextBox5 Name txtHarga
CheckBox1 Name chkEko
Text Ekonomi
CheckBox2 Name chkPatas
Text PatasAC
RadioButton1 Name rbCilacap
Text Cilacap
RadioButton2 Name rbPurwokerto
Text Purwokerto
RadioButton3 Name rbBanyumas
Text Banyumas
RadioButton4 Name rbKebumen
Text Kebumen
RadioButton5 Name rbPurbalingga
Text Purbalingga
DateTimePicker Name dtpTanggal
ComboBox1 Name cmbJumlah
Button1 Name btnData
Button2 Name btnSimpan
Button3 Name btnHapus
Button4 Name btnBatal
Button5 Name btnHitung
Button6 Name btnHome

9
2. Listing Program
Module1

Imports System.Data.Odbc
Imports System.Data
Imports System.Data.OleDb
Module Module1
Public X As Integer
Public COMMAND As OleDbCommand
Public READER As OleDbDataReader
Public CNN As OleDbConnection
Public KONEKSI As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=" & Application.StartupPath & "\Bus.accdb;"
End Module

Listing Program Form Selamat Datang


Public Class Form1

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Timer1.Tick
Label1.Left = Label1.Left - 20
If Label1.Left <= Panel1.Location.X - 350 Then
Label1.Left = Panel1.Width
End If
End Sub

Private Sub btnPesan_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnPesan.Click
Form2.Show()
End Sub

10
Private Sub btnInfo_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnInfo.Click
Form5.Show()
End Sub
End Class

Listing Program Form Pilih Armada


Public Class Form2

Private Sub btnTravel_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnTravel.Click
Form3.Show()
Me.Hide()
End Sub

Private Sub btnBus_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnBus.Click
Form6.Show()
Me.Hide()
End Sub
End Class

Listing Program Form Data Penumpang Travel


Imports System.Data
Imports System.Data.OleDb
Public Class Form3
Dim ConnString As String
Dim OnConnection As OleDbConnection = New OleDbConnection
Dim DTR As OleDbDataAdapter
Dim DES As DataSet
Dim Tablet As DataTableCollection

11
Dim OLECMD As OleDbCommand
Dim Sour1 As New BindingSource

Sub CLEAR()
txtnama.Text = ""
txtNoHP.Text = ""
txtNoKTP.Text = ""
txtalamat.Text = ""
txtHarga.Text = ""
lstTujuan.SelectedIndex = -1
cmbJumlah.Text = ""
End Sub

Sub refreshdata()
ConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
&Application.StartupPath & "\Travel.accdb;"
OnConnection.ConnectionString = ConnString
DES = New DataSet
Tablet = DES.Tables
DTR = New OleDbDataAdapter("Select * from [DataTravel]",
OnConnection)
DTR.Fill(DES, "DataTravel")
Dim view As New DataView(Tablet(0))
Sour1.DataSource = view
DataGridView1.DataSource = view
End Sub

Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Call refreshdata()
End Sub

12
Private Sub btnSimpan_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSimpan.Click
ConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\Travel.accdb;"
OnConnection.ConnectionString = ConnString
OnConnection.Open()
Dim Str As String
Str = "Insert into DataTravel
([NoKTP],[Nama],[NoHP],[TanggalKeberangkatan],[Alamat],[KotaTujuan]
,[Jumlah],[Harga]) values (?,?,?,?,?,?,?,?)"
Dim cmd As OleDbCommand = New OleDbCommand(Str, OnConnection)
cmd.Parameters.Add(New OleDbParameter("NoKTP",
CType(txtNoKTP.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Nama", CType(txtnama.Text,
String)))
cmd.Parameters.Add(New OleDbParameter("NoHP", CType(txtNoHP.Text,
String)))
cmd.Parameters.Add(New OleDbParameter("TanggalKeberangkatan",
CType(dtpTanggal.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Alamat",
CType(txtalamat.Text, String)))
cmd.Parameters.Add(New OleDbParameter("KotaTujuan",
CType(lstTujuan.Text, String)))
md.Parameters.Add(New OleDbParameter("Jumlah",
CType(cmbJumlah.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Harga", CType(txtHarga.Text,
String)))
Dim M As Integer
M = cmd.ExecuteNonQuery()
If M = 1 Then

13
MsgBox("Data Berhasil Dimasukkan", MsgBoxStyle.Information,
"Informasi")
cmd.Dispose()
OnConnection.Close()
Call refreshdata()
Else
MsgBox("Data Gagal Dimasukkan", MsgBoxStyle.Exclamation,
"Peringatan")
End If
End Sub

Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHapus.Click
Dim X As Integer
If MsgBox("Anda Yakin Ingin Menghapus Data?", MsgBoxStyle.YesNo,
"Attention!") = MsgBoxResult.Yes Then
ConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\Travel.accdb;"
OnConnection.ConnectionString = ConnString
OnConnection.Open()
Dim B As String
B = "Delete from (DataTravel) where NoKTP = '" & txtNoKTP.Text & "'"
Dim cmd As New OleDbCommand(B, OnConnection)
X = cmd.ExecuteNonQuery
If X = 1 Then
MsgBox("Data Telah Terhapus", MsgBoxStyle.Information, "Konfirmasi")
Call CLEAR()
txtNoKTP.Focus()
Else
MsgBox("Gagal Menghapus Data", MsgBoxStyle.Exclamation,
"Peringatan")

14
End If
cmd.Dispose()
OnConnection.Close()
Call refreshdata()
End If
End Sub

Private Sub btnHitung_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHitung.Click
If lstTujuan.Text = "Banyumas" Then
txtHarga.Text = (Val(55000) * (Val(cmbJumlah.Text)))
End If
If lstTujuan.Text = "Cilacap" Then
txtHarga.Text = (Val(50000) * (Val(cmbJumlah.Text)))
End If
If lstTujuan.Text = "Kebumen" Then
txtHarga.Text = (Val(45000) * (Val(cmbJumlah.Text)))
End If
If lstTujuan.Text = "Purbalingga" Then
txtHarga.Text = (Val(60000) * (Val(cmbJumlah.Text)))
End If
If lstTujuan.Text = "Purwokerto" Then
txtHarga.Text = (Val(65000) * (Val(cmbJumlah.Text)))
End If
End Sub

Private Sub btnBatal_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnBatal.Click
Call CLEAR()
btnSimpan.Enabled = True
btnHapus.Enabled = False

15
txtNoKTP.Enabled = True
txtNoKTP.Focus()
End Sub

Private Sub btnHome_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHome.Click
Form1.Show()
Me.Hide()
End Sub
End Class

Listing Program Form Data Penumpang Bus


Imports System.Data.OleDb
Imports System.Data
Public Class Form4

Public colNoKTP, colNama, colNoHP, colTanggalKeberangkatan,


colAlamat, colKategori, colTujuan, colHarga, colJumlah As String
Dim cnn As OleDbConnection
Dim command As OleDbCommand
Dim reader As OleDbDataReader

Private Sub CLEAR()


While Val(txtrekam.Text) > 0
ListView1.Items(0).Remove()
txtrekam.Text = Val(txtrekam.Text) - 1
End While
End Sub

16
Private Sub Choose()
Try
colNoKTP = ListView1.SelectedItems(0).SubItems(0).Text.ToString
colNama = ListView1.SelectedItems(0).SubItems(1).Text.ToString
colNoHP = ListView1.SelectedItems(0).SubItems(2).Text.ToString
colTanggalKeberangkatan =
ListView1.SelectedItems(0).SubItems(3).Text.ToString
colAlamat = ListView1.SelectedItems(0).SubItems(4).Text.ToString
colKategori = ListView1.SelectedItems(0).SubItems(5).Text.ToString
colTujuan = ListView1.SelectedItems(0).SubItems(6).Text.ToString
colJumlah = ListView1.SelectedItems(0).SubItems(7).Text.ToString
colHarga = ListView1.SelectedItems(0).SubItems(8).Text.ToString
Me.Close()
Catch ex As Exception
MsgBox("Pilih satu data!!", MsgBoxStyle.Critical)
End Try
End Sub

Public Sub list_data()


Call CLEAR()
Dim slct As String
Dim x As Integer
slct = "select
NoKTP,Nama,NoHP,TanggalKeberangkatan,Alamat,Kategori,KotaTujuan,J
umlah,Harga from DataBis where Nama like '%" & Trim(txtnama.Text) &
"%' order by Nama asc"
cnn = New OleDbConnection(KONEKSI)
If CNN.State <> ConnectionState.Connecting Then CNN.Close()
CNN.Open()
COMMAND = New OleDbCommand(slct, CNN)
READER = COMMAND.ExecuteReader

17
Try
While READER.Read = True
x = Val(txtrekam.Text)
txtrekam.Text = Str(Val(txtrekam.Text) + 1) & " Data Terekam"
With ListView1
.Items.Add("")
.Items(ListView1.Items.Count -1).SubItems.Add("")
.Items(ListView1.Items.Count -1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(ListView1.Items.Count - 1).SubItems.Add("")
.Items(x).SubItems(0).Text = READER.GetString(0)
.Items(x).SubItems(1).Text = READER.GetString(1)
.Items(x).SubItems(2).Text = READER.GetString(2)
.Items(x).SubItems(3).Text = READER.GetString(3)
.Items(x).SubItems(4).Text = READER.GetString(4)
.Items(x).SubItems(5).Text = reader.GetString(5)
.Items(x).SubItems(6).Text = reader.GetString(6)
.Items(x).SubItems(7).Text = reader.GetString(7)
.Items(x).SubItems(8).Text = reader.GetString(8)
End With
End While
Finally
READER.Close()
End Try
CNN.Close()
End Sub

18
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Call list_data()
End Sub

Private Sub ListView1_DoubleClick(ByVal sender As Object, ByVal e As


System.EventArgs) Handles ListView1.DoubleClick
Call Choose()
End Sub

Private Sub txtnama_TextChanged(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles txtnama.TextChanged
Call list_data()
End Sub

Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)
Call Choose()
End Sub

Private Sub btnKembali_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles btnKembali.Click
Form6.Show()
Me.Hide()
End Sub
End Class

19
Listing Program Form Informasi
Public Class Form5

Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnRefresh.Click
WebBrowser1.Refresh()
End Sub

Private Sub btnHome_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHome.Click
Form1.Show()
Me.Hide()
End Sub

Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
txtWeb.Text = "http://www.busefisiensi.com/"
WebBrowser1.Navigate(txtWeb.Text)
End Sub
End Class

Listing Program Form Penumpang Bus


Imports System.Data
Imports System.Data.OleDb
Public Class Form6

Sub CLEAR()
txtnama.Text = ""
txtNoKTP.Text = ""
txtNoHP.Text = ""
txtalamat.Text = ""

20
cmbJumlah.Text = ""
txtHarga.Text = ""
rbBanyumas.Checked = False
rbCilacap.Checked = False
rbKebumen.Checked = False
rbPurbalingga.Checked = False
rbPurwokerto.Checked = False
chkEko.Checked = False
chkPatas.Checked = False
End Sub

Private Sub btnSimpan_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnSimpan.Click
Dim Tujuan As String
Dim Kategori As String
If txtNoKTP.Text = "" Or txtnama.Text = "" Then
MsgBox("Lengkapi Data Anda!", MsgBoxStyle.Exclamation, "Something
Wrong")
Exit Sub
End If
If rbBanyumas.Checked = True Then
Tujuan = "Banyumas"
ElseIf rbCilacap.Checked = True Then
Tujuan = "Cilacap"
ElseIf rbKebumen.Checked = True Then
Tujuan = "Kebumen"
ElseIf rbPurbalingga.Checked = True Then
Tujuan = "Purbalingga"
Else
Tujuan = "Purwokerto"
End If

21
If chkEko.Checked = True Then
Kategori = "Ekonomi"
Else
Kategori = "Patas AC"
End If
CNN = New OleDbConnection(KONEKSI)
If CNN.State <> ConnectionState.Closed Then CNN.Close()
CNN.Open()
COMMAND = New OleDbCommand("insert into DataBis
(NoKTP,Nama,NoHP,TanggalKeberangkatan,Alamat,Kategori,KotaTujuan
,Jumlah,Harga) values ('" & txtNoKTP.Text & "','" & txtnama.Text & "','"
& txtNoHP.Text & "','" & dtpTanggal.Text & "','" & txtalamat.Text & "','"
& Kategori & "','" & Tujuan & "','" & cmbJumlah.Text & "','" &
txtHarga.Text & "')", CNN)
X = COMMAND.ExecuteNonQuery
If X = 1 Then
MsgBox("Berhasil Menyimpan", MsgBoxStyle.Information, "Konfirmasi")
Call CLEAR()
txtNoKTP.Focus()
Else
MsgBox("Gagal Menyimpan!", MsgBoxStyle.Exclamation, "Something
Wrong")
End If
End Sub

Private Sub btnHapus_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHapus.Click
If MsgBox("Anda Yakin Ingin Menghapus Data?", MsgBoxStyle.YesNo,
"Attention!") = MsgBoxResult.Yes Then
CNN = New OleDbConnection(KONEKSI)
If CNN.State <> ConnectionState.Closed Then CNN.Close()

22
CNN.Open()
COMMAND = New OleDbCommand("delete from DataBis where NoKTP
= '" & txtNoKTP.Text & "'", CNN)
X = COMMAND.ExecuteNonQuery
If X = 1 Then
Call CLEAR()
btnSimpan.Enabled = True
btnHapus.Enabled = False
txtNoKTP.Focus()
Else
MsgBox("Gagal menghapus data", MsgBoxStyle.Exclamation,
"Peringatan")
End If
End If
End Sub

Private Sub btnBatal_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnBatal.Click
Call CLEAR()
btnSimpan.Enabled = True
btnHapus.Enabled = False
txtNoKTP.Enabled = True
txtNoKTP.Focus()
End Sub

Private Sub btnData_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnData.Click
Dim DataBis As New Form4
DataBis.ShowDialog()
If DataBis.colNoKTP <> "" Then
txtNoKTP.Text = DataBis.colNoKTP

23
txtnama.Text = DataBis.colNama
dtpTanggal.Text = DataBis.colTanggalKeberangkatan
txtalamat.Text = DataBis.colAlamat
txtHarga.Text = DataBis.colHarga
cmbJumlah.Text = DataBis.colJumlah
If DataBis.colTujuan = "Banyumas" Then
rbBanyumas.Checked = True
ElseIf DataBis.colTujuan = "Cilacap" Then
rbCilacap.Checked = True
ElseIf DataBis.colTujuan = "Kebumen" Then
rbKebumen.Checked = True
ElseIf DataBis.colTujuan = "Purbalingga" Then
rbPurbalingga.Checked = True
ElseIf DataBis.colTujuan = "Purwokerto" Then
rbPurwokerto.Checked = True
End If
If DataBis.colKategori = "Ekonomi" Then
chkEko.Checked = True
Else
chkPatas.Checked = True
End If
txtNoKTP.Enabled = False
End If
btnSimpan.Enabled = False
btnHapus.Enabled = True
End Sub

Private Sub btnHitung_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHitung.Click
Dim Ekonomi As Integer = 10000
Dim PatasAC As Integer = 20000

24
If rbBanyumas.Checked Then txtHarga.Text = 60000
If rbCilacap.Checked Then txtHarga.Text = 55000
If rbKebumen.Checked Then txtHarga.Text = 50000
If rbPurbalingga.Checked Then txtHarga.Text = 65000
If rbPurwokerto.Checked Then txtHarga.Text = 70000
If chkEko.Checked And rbBanyumas.Checked Then
txtHarga.Text = (Val(60000) * (Val(cmbJumlah.Text))) + (Val(Ekonomi) *
(Val(cmbJumlah.Text)))
End If
If chkEko.Checked And rbCilacap.Checked Then
txtHarga.Text = (Val(55000) * (Val(cmbJumlah.Text))) + (Val(Ekonomi) *
(Val(cmbJumlah.Text)))
End If
If chkEko.Checked And rbKebumen.Checked Then
txtHarga.Text = (Val(50000) * (Val(cmbJumlah.Text))) + (Val(Ekonomi) *
(Val(cmbJumlah.Text)))
End If
If chkEko.Checked And rbPurbalingga.Checked Then
txtHarga.Text = (Val(65000) * (Val(cmbJumlah.Text))) + (Val(Ekonomi) *
(Val(cmbJumlah.Text)))
End If
If chkEko.Checked And rbPurwokerto.Checked Then
txtHarga.Text = (Val(70000) * (Val(cmbJumlah.Text))) + (Val(Ekonomi) *
(Val(cmbJumlah.Text)))
End If
If chkPatas.Checked And rbBanyumas.Checked Then
txtHarga.Text = (Val(60000) * (Val(cmbJumlah.Text))) + (Val(PatasAC) *
(Val(cmbJumlah.Text)))
End If
If chkPatas.Checked And rbCilacap.Checked Then

25
txtHarga.Text = (Val(55000) * (Val(cmbJumlah.Text))) + (Val(PatasAC) *
(Val(cmbJumlah.Text)))
End If
If chkPatas.Checked And rbKebumen.Checked Then
txtHarga.Text = (Val(50000) * (Val(cmbJumlah.Text))) + (Val(PatasAC) *
(Val(cmbJumlah.Text)))
End If
If chkPatas.Checked And rbPurbalingga.Checked Then
txtHarga.Text = (Val(65000) * (Val(cmbJumlah.Text))) + (Val(PatasAC) *
(Val(cmbJumlah.Text)))
End If
If chkPatas.Checked And rbPurwokerto.Checked Then
txtHarga.Text = (Val(70000) * (Val(cmbJumlah.Text))) + (Val(PatasAC) *
(Val(cmbJumlah.Text)))
End If
End Sub

Private Sub btnHome_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btnHome.Click
Form1.Show()
Me.Hide()
End Sub
End Class

26
3. Running Program
Running Program Form Selamat Datang

Gambar 7 Running program form Selamat Datang

Running Program Form Pilih Armada

Gambar 8 Running program form Pilih Armada

27
Running Program Form Data Penumpang Travel

Gambar 9 Running program form Data Penumpang Travel

Gambar 10 Running program form Data Penumpang Travel

28
Gambar 11 Running program form Data Penumpang Travel

Gambar 12 Running program form Data Penumpang Travel

29
Gambar 13 Running program form Data Penumpang Travel

Gambar 14 Running program form Data Penumpang Travel

30
Running Program Form Penumpang Bus

Gambar 15 Running program form Penumpang Bus

31
Gambar 16 Running program form Penumpang Bus

32
Gambar 17 Running program form Penumpang Bus

33
Running Program Form Data Penumpang Bus

Gambar 18 Running program form Data Penumpang Bus

Gambar 19 Running program form Data Penumpang Bus

34
Running Program Form Informasi

Gambar 20 Running program form Informasi

35

Anda mungkin juga menyukai