Aplikasi Katalog Belanja Kamera Plastik
Penjelasan Program
Pada tampilan pertama kita harus memilih barang yang ingin di pesan bila tidak akan muncul messagebox sebagai peringatan
Pilih Barang yang diinginkan pada combobox
Klik pilihan tersebut, picturebox akan memperlihatkan/mempreview barang yang dipilih setiap kali barang di klik
Setelah dipilih kita belum bisa mengetahui informasi barang tersebut (semua textbox disable) jadi klik button informasi barang untuk mengetahui informasi barangnya
Lalu klik pesan, messagebox yang keluar akan sesuai dengan stok barang yang dipilih
Screenshot diatas keluar messagebox yang menunjukkan stok habis sesuai pada informasi barang yaitu stok kosong (klik ok akan kembali ke tampilan semula)
Screenshot ini menunjukkan jika stok barang ada lalu klik yes
Klik Ok untuk memulai kembali kemudian keluar untuk keluar dari program
Source Code
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Enabled = True
TextBox2.Enabled = True
TextBox3.Enabled = True
Select Case ComboBox1.Text
Case Is = "Holga 120 CFN"
TextBox1.Text = "945.000"
Case Is = "Diana Mini"
TextBox1.Text = "700.000"
Case Is = "BlackbirdFly"
TextBox1.Text = "1.300.000"
Case Is = "XA"
TextBox1.Text = "600.000"
Case Is = "Fisheye #1"
TextBox1.Text = "845.000"
Case Is = "LC-A"
TextBox1.Text = "2.500.000"
Case Is = "Vivitar UWS"
TextBox1.Text = "450.000"
Case Is = "Horizon Kompakt"
TextBox1.Text = "5.000.000"
Case Is = "Horizon Perfekt"
TextBox1.Text = "6.200.000"
Case Is = "Diana F+"
TextBox1.Text = "1.200.000"
Case Is = "Diana F+ (CMYK)"
TextBox1.Text = "1.400.000"
Case Is = "Fisheye #2"
TextBox1.Text = "900.000"
Case Is = "Holga 135 BC"
TextBox1.Text = "500.000"
Case Is = "Smena 35"
TextBox1.Text = "600.000"
Case Is = "Eximus"
TextBox1.Text = "400.000"
Case Is = "Vivitar Mariner"
TextBox1.Text = "350.000"
Case Else
Dim a As Integer
a = MsgBox("Pilih Kamera terlebih dahulu", MsgBoxStyle.OkOnly, "Peringatan")
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
End Select
Select Case ComboBox1.Text
Case Is = "Holga 120 CFN"
TextBox2.Text = "728397"
Case Is = "Diana Mini"
TextBox2.Text = "638920"
Case Is = "BlackbirdFly"
TextBox2.Text = "582903"
Case Is = "XA"
TextBox2.Text = "108376"
Case Is = "Fisheye #1"
TextBox2.Text = "483920"
Case Is = "LC-A"
TextBox2.Text = "367829"
Case Is = "Vivitar UWS"
TextBox2.Text = "930765"
Case Is = "Horizon Kompakt"
TextBox2.Text = "425279"
Case Is = "Horizon Perfekt"
TextBox2.Text = "783635"
Case Is = "Diana F+"
TextBox2.Text = "829735"
Case Is = "Diana F+ (CMYK)"
TextBox2.Text = "230297"
Case Is = "Fisheye #2"
TextBox2.Text = "639283"
Case Is = "Holga 135 BC"
TextBox2.Text = "625346"
Case Is = "Smena 35"
TextBox2.Text = "654342"
Case Is = "Eximus"
TextBox2.Text = "346526"
Case Is = "Vivitar Mariner"
TextBox2.Text = "523423"
Case Else
TextBox2.Text = ""
End Select
Select Case ComboBox1.Text
Case Is = "Holga 120 CFN"
TextBox3.Text = "Ada"
Case Is = "Diana Mini"
TextBox3.Text = "Ada"
Case Is = "BlackbirdFly"
TextBox3.Text = "Kosong"
Case Is = "XA"
TextBox3.Text = "Kosong"
Case Is = "Fisheye #1"
TextBox3.Text = "Ada"
Case Is = "LC-A"
TextBox3.Text = "Ada"
Case Is = "Vivitar UWS"
TextBox3.Text = "Ada"
Case Is = "Horizon Kompakt"
TextBox3.Text = "Kosong"
Case Is = "Horizon Perfekt"
TextBox3.Text = "Ada"
Case Is = "Diana F+"
TextBox3.Text = "Ada"
Case Is = "Diana F+ (CMYK)"
TextBox3.Text = "Kosong"
Case Is = "Fisheye #2"
TextBox3.Text = "Ada"
Case Is = "Holga 135 BC"
TextBox3.Text = "Kosong"
Case Is = "Smena 35"
TextBox3.Text = "Ada"
Case Is = "Eximus"
TextBox3.Text = "Ada"
Case Is = "Vivitar Mariner"
TextBox3.Text = "Kosong"
Case Else
TextBox3.Text = ""
End Select
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = "Holga 120 CFN" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\holga-120cfn1.jpg")
ElseIf ComboBox1.Text = "Diana Mini" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\lomo_diana_mini_2.jpg")
ElseIf ComboBox1.Text = "BlackbirdFly" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\Dbar_Blackbird_Fly_20090915.jpg")
ElseIf ComboBox1.Text = "LC-A" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\lca01b.jpg")
ElseIf ComboBox1.Text = "Fisheye #1" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\fisheye1lrg.jpg")
ElseIf ComboBox1.Text = "Vivitar UWS" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\20071206_180977.jpg")
ElseIf ComboBox1.Text = "XA" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\xa-DSC_5199.jpg")
ElseIf ComboBox1.Text = "Horizon Kompakt" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\26384horizon-kompakt.jpg")
ElseIf ComboBox1.Text = "Diana F+ (CMYK)" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\diana-f-cmyk1.jpg")
ElseIf ComboBox1.Text = "Diana F+" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\dif_a.jpg")
ElseIf ComboBox1.Text = "Fisheye #2" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\fisheye.jpg")
ElseIf ComboBox1.Text = "Holga 135 BC" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\holga-135bc.jpg")
ElseIf ComboBox1.Text = "Horizon Perfekt" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\horizon_perfekt.jpg")
ElseIf ComboBox1.Text = "Smena 35" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\smena35.jpg")
ElseIf ComboBox1.Text = "Eximus" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\uws.jpg")
ElseIf ComboBox1.Text = "Vivitar Mariner" Then
PictureBox1.Image = System.Drawing.Image.FromFile("C:\Users\ThinkPad\Documents\Visual Studio 2005\Projects\Katalog\vivitar-mariner.jpg")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox3.Text = "Ada" Then
Dim x As Integer
x = MsgBox("Yakin memasukkan barang ini ke daftar pesanan?", MsgBoxStyle.YesNo, "Pesan")
If x = vbYes Then
MsgBox("Terima kasih, harap tunggu konfirmasi selanjutnya", MsgBoxStyle.OkOnly, "Pesan")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
End If
Else
Dim y As Integer
y = MsgBox("Barang tidak bisa dipesan, stok habis", MsgBoxStyle.OkOnly, "Pesan")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim o As Integer
o = MsgBox("Yakin keluar?", MsgBoxStyle.OkCancel + MsgBoxStyle.Question, "Keluar")
If o = vbOK Then
MsgBox("Anda telah keluar dari katalog kamera plastik", MsgBoxStyle.OkOnly, "Keluar")
End
End If
End Sub
End Class
Tidak ada komentar:
Posting Komentar