Tutorial
Komponen
|
Properties
|
Keterangan
|
Picturebox11
|
Name
Text
|
Picturebox11
|
Form1
|
Name
Text
|
Form1
Form1
|
DataGridView1
|
Name
|
DataGridView1
|
Label1
|
Name
Text
|
Label 1
Selamat Datang Di FDZ Fashion Masukan
Data Diri
|
Label2
|
Name
Text
|
Label 2
No. KTP
|
Label3
|
Name
Text
|
Label3
Nama
|
Label4
|
Name
Text
|
Label4
Alamat
|
Label5
|
Name
Text
|
Label5
Kode Pos
|
Label6
|
Name
Text
|
Label6
No. Telfon
|
Label7
|
Name
Text
|
Label7
Handphone
|
TextBox1
|
Name
Text
|
Textbox1
|
Textbox2
|
Name
Text
|
Textbox2
|
Textbox3
|
Name
Text
|
Textbox3
|
Textbox4
|
Name
Text
|
Textbox4
|
Textbox5
|
Name
Text
|
Textbox5
|
Textbox6
|
Name
Text
|
Textbox6
|
Textbox7
|
Name
Text
|
Textbox7
|
Form2
|
Name
Text
|
Form2
|
TextBox1
|
Name
Text
|
Textbox1
|
Textbox2
|
Name
Text
|
Textbox2
|
Textbox3
|
Name
Text
|
Textbox3
|
Textbox4
|
Name
Text
|
Textbox4
|
Textbox5
|
Name
Text
|
Textbox5
|
Textbox6
|
Name
Text
|
Textbox6
|
Textbox7
|
Name
Text
|
Textbox7
|
TextBox8
|
Name
Text
|
Textbox8
|
Textbox9
|
Name
Text
|
Textbox9
|
Textbox10
|
Name
Text
|
Textbox10
|
Textbox11
|
Name
Text
|
Textbox11
|
Textbox12
|
Name
Text
|
Textbox12
|
Textbox13
|
Name
Text
|
Textbox13
|
Picturebox1
|
Name
Text
|
Picturebox1
|
Picturebox2
|
Name
Text
|
Picturebox2
|
Picturebox3
|
Name
Text
|
Picturebox3
|
Picturebox4
|
Name
Text
|
Picturebox4
|
Picturebox5
|
Name
Text
|
Picturebox5
|
Picturebox6
|
Name
Text
|
Picturebox6
|
Picturebox7
|
Name
Text
|
Picturebox7
|
Picturebox8
|
Name
Text
|
Picturebox8
|
Picturebox9
|
Name
Text
|
Picturebox9
|
Picturebox10
|
Name
Text
|
Picturebox10
|
Picturebox11
|
Name
Text
|
Picturebox11
|
Picturebox12
|
Name
Text
|
Picturebox12
|
Label1
|
Name
Text
|
Label1
|
Label2
|
Name
Text
|
Label2
Merk
|
Label3
|
Name
Text
|
Label3
Merk
|
Label4
|
Name
Text
|
Label4
Merk
|
Label5
|
Name
Text
|
Label5
Harga
|
Label6
|
Name
Text
|
Label6
Harga
|
Label7
|
Name
Text
|
Label7
Harga
|
Label8
|
Name
Text
|
Label8
Jenis Barang
|
Label9
|
Name
Text
|
Label9
Jenis Barang
|
Label10
|
Name
Text
|
Label10
Jenis Barang
|
Label11
|
Name
Text
|
Label11
Diskon
|
Label12
|
Name
Text
|
Label12
Diskon
|
Label13
|
Name
Text
|
Label13
Diskon
|
Label14
|
Name
Text
|
Label14
Total
|
Label15
|
Name
Text
|
Label15
Total Bayar
|
Label16
|
Name
Text
|
Label16
Bayar
|
Label17
|
Name
Text
|
Label17
Kembali
|
Form3
|
Name
Text
|
Form3
|
Label1
|
Name
Text
|
Label1
Selamat
datang di FDZ fashion
|
Label2
|
Name
Text
|
Label2
User
|
Label3
|
Name
Text
|
Label3
password
|
Textbox1
|
Name
Text
|
Textbox1
|
Textbox2
|
Name
Text
|
Textbox2
|
Button1
|
Name
Text
|
Button1
Login
|
Button2
|
Name
Text
|
Button2
Batal
|
listing
Public Class Form3
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Me.Close()
End Sub
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
If
TextBox1.Text = "admin" And TextBox2.Text = "admin"
Then
Me.Hide()
Form1.Show()
Else :
MsgBox("Login Gagal, User dan Pass tidak
sesuai")
End If
End Sub
Private Sub
Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
End Sub
End Class
listing
Public Class Form1
Private Sub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.Text
= "Pemesanan Barang Di FDZ Fashion"
Me.BackColor
= Color.Pink
End Sub
Private Sub
Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Label2.Click
End Sub
Private Sub
Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
Me.Close()
End Sub
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
Me.TextBox2.Clear()
Me.TextBox3.Clear()
Me.TextBox4.Clear()
Me.TextBox5.Clear()
Me.TextBox6.Clear()
Me.TextBox7.Clear()
End Sub
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
If
TextBox2.Text = "" Then
MsgBox("Data
Belum Lengkap")
Return
ElseIf
TextBox3.Text = "" Then
MsgBox("Data
Belum lengkap")
Return
ElseIf
TextBox4.Text = "" Then
MsgBox("Data
Belum lengkap")
Return
ElseIf
TextBox5.Text = "" Then
MsgBox("Data
Belum lengkap")
Return
ElseIf
TextBox6.Text = "" Then
MsgBox("Data
Belum lengkap")
Return
ElseIf
TextBox7.Text = "" Then
MsgBox("Data
Belum lengkap")
Return
End If
Form2.Show()
Me.Hide()
End Sub
End Class
listing
Public Class Form2
Dim jumlahbrg As
Double
Dim harga As
Double
Dim jml As
Double
Dim bayar As
Double
Dim diskon As
Double
Dim potong As
Double
Dim hasil As
Double
Private Sub
Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.BackColor
= Color.Pink
Dim
nama As String
Dim ala
As String
Dim nope
As Integer
Dim hp As Integer
nama = Form1.TextBox3.Text
ala = Form1.TextBox4.Text
nope = Form1.TextBox6.Text
hp = Form1.TextBox7.Text
Label18.Text = nama
Label24.Text = "62"
& hp
Label21.Text = ala
Label22.Text = "+62"
& nope
ComboBox1.Text = "Jenis Barang"
With
ComboBox1
.Items.Add("Sepatu")
.Items.Add("Baju")
.Items.Add("Celana")
End With
ComboBox2.Text = "Merk Barang"
With
ComboBox2
.Items.Add("Homy
Ped")
.Items.Add("New
Era")
.Items.Add("Triset")
.Items.Add("Spotty")
End With
ComboBox3.Text = "Merk Barang"
With
ComboBox3
.Items.Add("Nevada")
.Items.Add("Zara")
.Items.Add("Calvin")
.Items.Add("Metersbonwe")
End With
ComboBox4.Text = "Merk Barang"
With
ComboBox4
.Items.Add("Levi's")
.Items.Add("Logo")
.Items.Add("Vallas")
.Items.Add("Ninety
Degrees")
End With
Label2.Hide()
Label5.Hide()
Label8.Hide()
Label11.Hide()
Label12.Hide()
Label13.Hide()
ComboBox2.Hide()
TextBox1.Hide()
TextBox4.Hide()
Label3.Hide()
Label6.Hide()
Label9.Hide()
ComboBox3.Hide()
TextBox2.Hide()
TextBox5.Hide()
Label4.Hide()
Label7.Hide()
Label10.Hide()
ComboBox4.Hide()
TextBox3.Hide()
TextBox6.Hide()
TextBox10.Hide()
TextBox11.Hide()
TextBox12.Hide()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
PictureBox9.Hide()
PictureBox10.Hide()
PictureBox11.Hide()
PictureBox12.Hide()
End Sub
Private Sub
Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub
ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
If
ComboBox2.Text = "Homy Ped" Then
PictureBox1.Show()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
TextBox1.Text = "1000000"
ElseIf
ComboBox2.Text = "New Era" Then
TextBox1.Text = "1500000"
PictureBox2.Show()
PictureBox1.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
ElseIf
ComboBox2.Text = "Triset" Then
TextBox1.Text = "1750000"
PictureBox3.Show()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox4.Hide()
ElseIf
ComboBox2.Text = "Spotty" Then
PictureBox4.Show()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
TextBox1.Text = "1250000"
End If
End Sub
Private Sub
ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
ComboBox3.SelectedIndexChanged
If
ComboBox3.Text = "Nevada" Then
PictureBox5.Show()
PictureBox6.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
TextBox2.Text = "100000"
ElseIf
ComboBox3.Text = "Zara" Then
PictureBox6.Show()
PictureBox5.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
TextBox2.Text = "150000"
ElseIf
ComboBox3.Text = "Calvin" Then
PictureBox7.Show()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox8.Hide()
TextBox2.Text = "175000"
ElseIf
ComboBox3.Text = "Metersbonwe" Then
PictureBox8.Show()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox7.Hide()
TextBox2.Text = "125000"
End If
End Sub
Private Sub
ComboBox4_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
ComboBox4.SelectedIndexChanged
If
ComboBox4.Text = "Levi's" Then
TextBox3.Text = "1000000"
PictureBox9.Show()
PictureBox10.Hide()
PictureBox11.Hide()
PictureBox12.Hide()
ElseIf
ComboBox4.Text = "Logo" Then
PictureBox10.Show()
PictureBox9.Hide()
PictureBox11.Hide()
PictureBox12.Hide()
TextBox3.Text = "1500000"
ElseIf
ComboBox4.Text = "Vallas" Then
PictureBox11.Show()
PictureBox9.Hide()
PictureBox10.Hide()
PictureBox12.Hide()
TextBox3.Text = "1750000"
ElseIf
ComboBox4.Text = "Ninety Degrees" Then
PictureBox12.Show()
PictureBox9.Hide()
PictureBox10.Hide()
PictureBox11.Hide()
TextBox3.Text = "1250000"
End If
End Sub
Private Sub
ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
If
ComboBox1.Text = "Sepatu" Then
Label2.Show()
Label5.Show()
Label8.Show()
Label11.Show()
ComboBox2.Show()
TextBox1.Show()
TextBox4.Show()
Label3.Hide()
Label6.Hide()
Label9.Hide()
Label12.Hide()
ComboBox3.Hide()
TextBox2.Hide()
TextBox5.Hide()
Label4.Hide()
Label7.Hide()
Label10.Hide()
Label13.Hide()
ComboBox4.Hide()
TextBox3.Hide()
TextBox6.Hide()
TextBox10.Show()
TextBox11.Hide()
TextBox12.Hide()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
PictureBox9.Hide()
PictureBox10.Hide()
PictureBox11.Hide()
PictureBox12.Hide()
ElseIf
ComboBox1.Text = "Baju" Then
Label2.Hide()
Label5.Hide()
Label8.Hide()
Label11.Hide()
ComboBox2.Hide()
TextBox1.Hide()
TextBox4.Hide()
Label3.Show()
Label6.Show()
Label9.Show()
Label12.Show()
ComboBox3.Show()
TextBox2.Show()
TextBox5.Show()
Label4.Hide()
Label7.Hide()
Label10.Hide()
Label13.Hide()
ComboBox4.Hide()
TextBox3.Hide()
TextBox6.Hide()
TextBox10.Hide()
TextBox11.Show()
TextBox12.Hide()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
PictureBox9.Hide()
PictureBox10.Hide()
PictureBox11.Hide()
PictureBox12.Hide()
ElseIf
ComboBox1.Text = "Celana" Then
Label2.Hide()
Label5.Hide()
Label8.Hide()
Label11.Hide()
ComboBox2.Hide()
TextBox1.Hide()
TextBox4.Hide()
Label3.Hide()
Label6.Hide()
Label9.Hide()
Label12.Hide()
ComboBox3.Hide()
TextBox2.Hide()
TextBox5.Hide()
Label4.Show()
Label7.Show()
Label10.Show()
Label13.Show()
ComboBox4.Show()
TextBox3.Show()
TextBox6.Show()
TextBox10.Hide()
TextBox11.Hide()
TextBox12.Show()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox4.Hide()
PictureBox5.Hide()
PictureBox6.Hide()
PictureBox7.Hide()
PictureBox8.Hide()
PictureBox9.Hide()
PictureBox10.Hide()
PictureBox11.Hide()
PictureBox12.Hide()
End If
End Sub
Private Sub
Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
If
ComboBox1.Text = "Sepatu" Then
harga = Val(TextBox1.Text)
jumlahbrg = Val(TextBox4.Text)
diskon = Val(TextBox10.Text)
potong = (jumlahbrg * harga *
diskon) / 100
jml = ((harga * jumlahbrg) -
potong)
TextBox7.Text = jml
ElseIf
ComboBox1.Text = "Baju" Then
harga = Val(TextBox2.Text)
jumlahbrg = Val(TextBox5.Text)
diskon = Val(TextBox11.Text)
potong = (jumlahbrg * harga *
diskon) / 100
jml = ((harga * jumlahbrg) -
potong)
TextBox7.Text = jml
ElseIf
ComboBox1.Text = "Celana" Then
harga =
Val(TextBox3.Text)
jumlahbrg = Val(TextBox6.Text)
diskon = Val(TextBox12.Text)
potong = (jumlahbrg * harga *
diskon) / 100
jml = ((harga * jumlahbrg) -
potong)
TextBox7.Text = jml
End If
End Sub
Private Sub
TextBox8_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
TextBox8.TextChanged
End Sub
Private Sub
Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
bayar = Val(TextBox8.Text)
hasil = bayar - jml
If
hasil < "0" Then
MsgBox("Uang
Kurang", MsgBoxStyle.Critical)
Else
TextBox9.Text = hasil
End If
End Sub
Private Sub
TextBox10_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
TextBox10.TextChanged
End Sub
Private Sub
TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
TextBox9.TextChanged
End Sub
Private Sub
Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
Me.Close()
Form1.Show()
End Sub
Private Sub
Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button4.Click
If
ComboBox1.Text = "Sepatu" Then
Dim
jen As String =
ComboBox1.SelectedItem
Dim
merk As String
= ComboBox2.Text
Dim
har As String =
TextBox1.Text
Dim
dis As String =
TextBox10.Text
Dim
jum As String =
TextBox4.Text
Dim
tot As String =
TextBox7.Text
DataGridView1.Rows.Add(jen, merk,
har, dis, jum, tot)
ElseIf
ComboBox1.Text = "Baju" Then
Dim
jen As String =
ComboBox1.SelectedItem
Dim
merk As String
= ComboBox3.Text
Dim
har As String =
TextBox2.Text
Dim
dis As String =
TextBox11.Text
Dim
jum As String =
TextBox5.Text
Dim
tot As String =
TextBox7.Text
DataGridView1.Rows.Add(jen, merk,
har, dis, jum, tot)
ElseIf
ComboBox1.Text = "Celana" Then
Dim
jen As String =
ComboBox1.SelectedItem
Dim
merk As String
= ComboBox3.Text
Dim har As String =
TextBox3.Text
Dim
dis As String =
TextBox12.Text
Dim
jum As String =
TextBox6.Text
Dim
tot As String =
TextBox7.Text
DataGridView1.Rows.Add(jen, merk,
har, dis, jum, tot)
End If
ComboBox1.Text = "Jenis Barang"
TextBox7.Text = ""
Label2.Hide()
Label5.Hide()
Label8.Hide()
Label11.Hide()
Label12.Hide()
Label13.Hide()
ComboBox2.Hide()
TextBox1.Hide()
TextBox4.Hide()
Label3.Hide()
Label6.Hide()
Label9.Hide()
ComboBox3.Hide()
TextBox2.Hide()
TextBox5.Hide()
Label4.Hide()
Label7.Hide()
Label10.Hide()
ComboBox4.Hide()
TextBox3.Hide()
TextBox6.Hide()
TextBox10.Hide()
TextBox11.Hide()
TextBox12.Hide()
End Sub
Private Sub
Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button5.Click
Dim
totalbelanja As Long
totalbelanja = 0
For t As Integer = 0 To DataGridView1.Rows.Count - 1
totalbelanja = totalbelanja +
Val(DataGridView1.Rows(t).Cells(5).Value)
Next
TextBox13.Text = totalbelanja
End Sub
Private Sub
DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.DataGridViewCellEventArgs)
Handles DataGridView1.CellContentClick
End Sub
Private Sub
Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button6.Click
MsgBox("Pesanan
Akan Segera diantar")
Me.Close()
Form1.Show()
End Sub
Private Sub
Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Label1.Click
End Sub
End Class
Tidak ada komentar:
Posting Komentar