TUTORIAL MEMBUAT MESIN KASIR G-NETO
STORE
1.
Langkah
pertama yang kami lakukan buka program Visual
Basic 2010, kemuadian pilih new
Project buat form baru.
2. Buat nama Program
dengan Label “G-NATO STORE”, kemudian
buat label sesuai yang tertera di dalam project seperti name, address, product, price, count, discount, %, total, cash, refund.
3.
Lalu
buat textBox buat masing-masing label
di di atas.
4.
Pada
Label Product menggunakan ComboBox buat memilih tipe Product-nya
disertai dengan gambar product, List Programnya sebagai berikut :
Public Class
Form1
Private Sub
Form1_Load(sender As System.Object, e As
System.EventArgs) Handles
MyBase.Load
Me.ForeColor
= Color.Black
Me.BackColor
= Color.Black
Me.Text
= "G-Nato Product"
With
ComboBox1
.Items.Add("Adidas")
.Items.Add("Nike")
.Items.Add("Reebok")
.Items.Add("Lotto")
.Items.Add("Puma")
.Items.Add("Speed")
.Items.Add("Nevada")
.Items.Add("Piero")
.Items.Add("TomKins")
.Items.Add("Crocs")
End With
End Sub
Private Sub
ComboBox1_SelectedIndexChanged(sender As
System.Object, e As
System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
If
TextBox1.Text = "" Then
MsgBox("You
must entry your name!")
ComboBox1.Text = ""
TextBox3.Text = ""
Else
If
TextBox2.Text = "" Then
MsgBox("please
entry your address")
ComboBox1.Text = ""
TextBox3.Text = ""
End
If
End If
If
ComboBox1.Text = ("Adidas") Then
TextBox3.Text = ("650000")
PictureBox1.Visible = True
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Nike") Then
TextBox3.Text = ("600000")
PictureBox1.Visible = False
PictureBox2.Visible = True
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Reebok") Then
TextBox3.Text = ("350000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = True
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Lotto") Then
TextBox3.Text = ("275000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = True
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Puma") Then
TextBox3.Text = ("250000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = True
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Speed") Then
TextBox3.Text = ("200000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = True
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Nevada") Then
TextBox3.Text = ("175000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = True
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Piero") Then
TextBox3.Text = ("270000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = True
PictureBox9.Visible = False
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("TomKins") Then
TextBox3.Text = ("425000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = True
PictureBox10.Visible = False
End If
If
ComboBox1.Text = ("Crocs") Then
TextBox3.Text = ("275000")
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
PictureBox4.Visible = False
PictureBox5.Visible = False
PictureBox6.Visible = False
PictureBox7.Visible = False
PictureBox8.Visible = False
PictureBox9.Visible = False
PictureBox10.Visible = True
End If
End Sub
5.
Pada Button Payment masukkan list programnya
sebagai berikut
Private Sub
Button1_Click(sender As System.Object, e As
System.EventArgs) Handles
Button1.Click
If
TextBox6.Text = "" Then
MsgBox("please
entry the money")
Else
TextBox7.Text = TextBox6.Text -
TextBox8.Text
End If
If
TextBox7.Text = "" Then
MsgBox("the bill would be known if you entry the
money")
Else
If
TextBox7.Text < 0 Then
TextBox7.Text = ""
If
TextBox7.Text = "" Then
MsgBox(" your money isn't enough! ")
End
If
End
If
End If
If
TextBox7.Text = "" Then
MsgBox("sorry,
transection is failed")
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
End If
End Sub
6.
Pada
Button5, button Process masukkan list program untuk menghitung biaya setelah
dikenai diskon.
Private Sub
Button5_Click_1(sender As System.Object, e As
System.EventArgs) Handles
Button5.Click
If
TextBox4.Text = "" Then
MsgBox("please
entry the product")
End If
If
TextBox5.Text = "" Then
MsgBox("please
entry the price")
Else
TextBox8.Text = (TextBox4.Text *
TextBox3.Text) - (TextBox4.Text * TextBox3.Text * (TextBox5.Text / 100))
End If
End Sub
7.
Pada Button3
“Refresh” masukkkan list program sebagai berikut
Private Sub
Button3_Click(sender As System.Object, e As
System.EventArgs) Handles
Button3.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
ComboBox1.Text = ""
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
PictureBox9.Hide()
PictureBox10.Hide()
DataGridView1.Hide()
End Sub
8.
Kemudian
buat data Grid View untuk memasukkan data product yang akan dibeli oleh
customer. Buat Button4 “Input” dan masukkan listnya.
Private Sub
Button4_Click(sender As System.Object, e As
System.EventArgs) Handles
Button4.Click
With Me.DataGridView1.Rows.Add(Me.TextBox1.Text,
TextBox2.Text, ComboBox1.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text,
TextBox8.Text, TextBox6.Text, TextBox7.Text)
End With
DataGridView1.Show()
End Sub
Dan hasilnya seperti dibawah ini:
Terimakasih Bang Atas Postingannya Cakep Tu Mantab Dan Bikin Ger dan semangat belajar.
BalasHapusOh Ya Bang Apakah Komponen OCX OsenXPSuite 2006 itu bisa Dipasang Di VB Net Mohon Solusi Ditunggu Balesannya,Maaf Masih Belajar
DITUNGGU BALESANNYA DISINI PAK BOS