by cintya saraswati
Kali ini saya membuat program pembelian tiket konser "British Music Festival 2015", Dari desain sendiri dibuat sesimpel mungkin tapi tetap menunjukkan keeleganan.
2. Radio Button Diklik maka akan keluar profil band tersebut sehingga pelanggan merasa tertarik untuk membeli tiket konser tersebut
Penampakan lain ketika,radio buttin diklik :D
Ketika Memilih band yang kita inginkan terdapat informasi dalam combo box kanan berisi lokasi,jam,serta harga tiket. Tak lupa otomastis harga pada kolom bawah ikut muncul
Ketika memilih quantity, maka otomatis harga sudah terhitung
Ketika memilih pay, ada dialog bertulikan "" Konfirmasi telah melakukan Pembayaran"
Tampilan List Box, yaitu muncul nomor pembelian tiket, nama pembeli, dan kartu kredit
PENJELASAN SINGKAT MENGENAI APLIKASI PEMBELIAN TIKET SECARA ONLINE
Aplikasi pembelian tiket konser “British Music Festival Live in Jakarta”
Penggunannya sangat simpel
Radio button dipencet akan mengeluarkan info dan profil ttg band , supaya pelanggan mengetahui keistimewaan band pada textbox berkolom hitam
Yaitu pelanggan hanya memasukkan data pada number purchase order, full name
Saat memilih band yang akan dibeli maka ada keterangan pada text box yang berisi keterangan harga,lokasi konser hingga jam,........ beserta harganya. Kemudian otomatis akan keluar harga pada adult dan student price.
Setelah itu jika kita memesan jumlah pada kolom numerik maka otomatis akan keluar quantity pada checkbox dibawah.
Setelah itu total harga akan muncul pada textbox total.
Kemudian jika kita klik pay maka ada konfirmasi pada dialog. Terdapat pilahan “Konfirmasi telah melakukan pembayaran?” ketika pilih yes. Akan ada dialog “terimakasih telah melakukan pembayarab”
Ketika memilih reset, semua huruf pada pilihan combo box akan hilang.
Dan ketika memilih tombol exit, akan keluar dr program
KODINGAN
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim tanggal As Integer
tanggal = 1
Do
ComboBoxDate.Items.Add(tanggal)
tanggal = tanggal + 1
Loop Until tanggal >= 32
For b = 2014 To 2015
ComboBoxYear.Items.Add(b)
Next
ComboBoxMonth.Items.Add("January")
ComboBoxMonth.Items.Add("February")
ComboBoxMonth.Items.Add("March")
ComboBoxMonth.Items.Add("April")
ComboBoxMonth.Items.Add("May")
ComboBoxMonth.Items.Add("June")
ComboBoxMonth.Items.Add("July")
ComboBoxMonth.Items.Add("August")
ComboBoxMonth.Items.Add("September")
ComboBoxMonth.Items.Add("October")
ComboBoxMonth.Items.Add("November")
ComboBoxMonth.Items.Add("December")
PictureBox1.Image = Image.FromFile("B.jpg")
ComboBoxBand.Items.Add("The 1975")
ComboBoxBand.Items.Add("London Grammar")
ComboBoxBand.Items.Add("Wolf Alice")
ComboBoxBand.Items.Add("Saint Raymond")
TextBoxBandDesc.ReadOnly = True
TextBoxPrice.ReadOnly = True
TextBoxStudentPrice.ReadOnly = True
TextBox2.ReadOnly = True
TextBoxQuantity.ReadOnly = True
TextBoxPrice.ReadOnly = True
TextBoxStudentQuantity.ReadOnly = True
TextBoxStudentPrice.ReadOnly = True
TextBoxTotal.ReadOnly = True
TextBoxQuantity.Text = 0
TextBoxPrice.Text = 0
TextBoxStudentQuantity.Text = 0
TextBoxStudentPrice.Text = 0
TextBoxTotal.Text = 0
End Sub
Private Sub ComboBoxBand_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBoxBand.SelectedIndexChanged
Dim selectband As String
selectband = ComboBoxBand.Text
Select Case ComboBoxBand.SelectedItem
Case "The 1975"
TextBoxPrice.Text = 1000000
TextBoxStudentPrice.Text = 800000
TextBox2.Text = " VENUE: Lap. Tennis Indoor Senayan at 10.00 pm HTM: 1000 IDR (ADULT) 800 IDR (student) "
Case "London Grammar"
TextBoxPrice.Text = 900000
TextBoxStudentPrice.Text = 600000
TextBox2.Text = " VENUE: Lap. Tennis Indoor Senayan at 08.00 pm HTM: 900 IDR (ADULT) 600 IDR (student) "
Case "Wolf Alice"
TextBoxPrice.Text = 600000
TextBoxStudentPrice.Text = 500000
TextBox2.Text = " VENUE: Lap. Tennis Indoor Senayan at 07.00 pm HTM: 600 IDR (ADULT) 500 IDR (student) "
Case "Saint Raymond"
TextBoxPrice.Text = 400000
TextBoxStudentPrice.Text = 300000
TextBox2.Text = " VENUE: Lap. Tennis Indoor Senayan at 06.00 pm HTM: 500 IDR (ADULT) 400 IDR (student)"
End Select
'hitung
Dim harga, hargastudent, banyak, banyakstudent, hargatotal As Integer
harga = Integer.Parse(TextBoxPrice.Text)
hargastudent = Integer.Parse(TextBoxStudentPrice.Text)
banyak = Integer.Parse(TextBoxQuantity.Text)
banyakstudent = Integer.Parse(TextBoxStudentQuantity.Text)
hargatotal = (banyak * harga) + (banyakstudent * hargastudent)
TextBoxTotal.Text = hargatotal
End Sub
Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButton1975.CheckedChanged
If RadioButton1975.Checked = True Then
PictureBox1.Image = Image.FromFile("1.jpg")
TextBoxBandDesc.Text = "The 1975 is an English indie rock band formed in Manchester. The group consists of Matthew Healy, The album debuted at No. 1 in the UK Albums Chart on 8 September 2013. The band has toured internationally and also played the 2014 Coachella festivalam Hann, George Daniel, and Ross MacDonald."
End If
End Sub
Private Sub RadioButtonBM_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButtonBM.CheckedChanged
If RadioButtonBM.Checked = True Then
PictureBox1.Image = Image.FromFile("B.JPG")
TextBoxBandDesc.Text = "British Music Festival 2015 is an annual music and arts festival held at Lapangan Tennis Indoor Senayan,Jakarta, Indonesia."
End If
End Sub
Private Sub RadioButtonLG_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButtonLG.CheckedChanged
If RadioButtonLG.Checked = True Then
PictureBox1.Image = Image.FromFile("2.png")
TextBoxBandDesc.Text = "London Grammar is a British trio formed by Hannah Reid, Dan Rothman and Dominic 'Dot' Major. Their debut EP Metal & Dust was released in February 2013 by Metal & Dust Recordings Ltd,[9] while their debut album If You Wait was released on 9 September 2013. If You Wait has been certified platinum in Australia and the UK, shipping over 70,000 and 300,000 copies respectively."
End If
End Sub
Private Sub RadioButtonWA_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButtonWA.CheckedChanged
If RadioButtonWA.Checked = True Then
PictureBox1.Image = Image.FromFile("3.JPG")
TextBoxBandDesc.Text = "Wolf Alice are a four-piece alternative rock band from North London, consisting of Ellie Rowsell, Joel Amey, Joff Oddie and Theo Ellis. They released their debut single Fluffy in February 2013, the 'Bros' single followed this in May. In October 2013, they released their debut EP Blush. Their second EP Creature Songs was released in May 2014 on Dirty Hit Records. On February 24th 2015 they released the lead single Giant Peach from their debut album My Love Is Cool, scheduled for release on 22 June 2015."
End If
End Sub
Private Sub RadioButtonSR_CheckedChanged(sender As Object, e As EventArgs) Handles RadioButtonSR.CheckedChanged
If RadioButtonSR.Checked = True Then
PictureBox1.Image = Image.FromFile("4.JPG")
TextBoxBandDesc.Text = "Callum Burrows (born 30 March 1995) better known by his stage name Saint Raymond, is a singer-songwriter from Nottingham.. Escapade featured heavily in the iTunes album chart upon its release and the lead track Fall At Your Feet promoted as iTunes Single of the Week"
End If
End Sub
Private Sub NumericUpDownStudent_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDownStudent.ValueChanged
TextBoxStudentQuantity.Text = NumericUpDownStudent.Value
'hitung
Dim harga, hargastudent, banyak, banyakstudent, hargatotal As Integer
harga = Integer.Parse(TextBoxPrice.Text)
hargastudent = Integer.Parse(TextBoxStudentPrice.Text)
banyak = Integer.Parse(TextBoxQuantity.Text)
banyakstudent = Integer.Parse(TextBoxStudentQuantity.Text)
hargatotal = (banyak * harga) + (banyakstudent * hargastudent)
TextBoxTotal.Text = hargatotal
End Sub
Private Sub NumericUpDownAdult_ValueChanged(sender As Object, e As EventArgs) Handles NumericUpDownAdult.ValueChanged
TextBoxQuantity.Text = NumericUpDownAdult.Value
'hitung
Dim harga, hargastudent, banyak, banyakstudent, hargatotal As Integer
harga = Integer.Parse(TextBoxPrice.Text)
hargastudent = Integer.Parse(TextBoxStudentPrice.Text)
banyak = Integer.Parse(TextBoxQuantity.Text)
banyakstudent = Integer.Parse(TextBoxStudentQuantity.Text)
hargatotal = (banyak * harga) + (banyakstudent * hargastudent)
TextBoxTotal.Text = hargatotal
End Sub
Private Sub TextBoxTotal_TextChanged(sender As Object, e As EventArgs) Handles TextBoxTotal.TextChanged
'hitung
Dim harga, hargastudent, banyak, banyakstudent, hargatotal As Integer
harga = Integer.Parse(TextBoxPrice.Text)
hargastudent = Integer.Parse(TextBoxStudentPrice.Text)
banyak = Integer.Parse(TextBoxQuantity.Text)
banyakstudent = Integer.Parse(TextBoxStudentQuantity.Text)
hargatotal = (banyak * harga) + (banyakstudent * hargastudent)
TextBoxTotal.Text = hargatotal
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim hargatotal As Integer
hargatotal = Integer.Parse(TextBoxTotal.Text)
If hargatotal > 0 Then
Dim response = MsgBox("Konfirmasi telah melakukan pembayaran?", MsgBoxStyle.YesNo)
If response = MsgBoxResult.Yes Then
MsgBox("Terimakasih telah melakukan pembayaran!")
End If
End If
End Sub
Private Sub ButtonReset_Click(sender As Object, e As EventArgs) Handles ButtonReset.Click
TextBoxNumberPurchase.Text = ""
TextBoxFullname.Text = ""
TextBoxPrice.Text = ""
TextBoxQuantity.Text = ""
TextBoxStudentPrice.Text = ""
TextBoxStudentQuantity.Text = ""
ComboBoxBand.Text = ""
ComboBoxDate.Text = ""
ComboBoxMonth.Text = ""
ComboBoxYear.Text = ""
NumericUpDownAdult.Text = ""
NumericUpDownStudent.Text = ""
TextBoxTotal.Text = ""
End Sub
Private Sub ButtonExit_Click(sender As Object, e As EventArgs) Handles ButtonExit.Click
Me.Close()
End Sub