Followers

About Me

RSS

diskripsi dan prosedur latihan 06

 ·   Deskripsi Form Latihan 06
Form Latihan_06_36110030 terdapat lima object yaitu Label, textbox,  button, Checkbox dan RadioButton.
Object Label
Terdapat tujuh label yang bertuliskan “Makanan Khas Makassar”, “Makanan”, “Harga”, “Qty”, “Jumlah”, “Total”, dan “Jumlah Bersih”.
  Object Textbox
Terdapat dua puluh satu textbox  yaitu “Hargac36110030”, “Hargap36110030”, “HargaSK36110030”, “HargaSS_36110030”, “HargaKB_36110030”, “Hargaulu_36110030”, “QtyC_36110030”, “QtyP_36110030”, “QtySK_36110030”, “QtySS_36110030” “QtyKB_36110030”, “Qtyulu_36110030”, "JumlahC_36110030", "JumlahP_36110030", "JumlahSK_36110030", "JumlahSS_36110030", "JumlahKB_36110030", "JumlahUlu_36110030", "Total_36110030", "Potongan_36110030", dan “jumber_36110030”.
Object Button
Terdapat satu ubject button (“Cancel”) digunakan untuk menghapus semua isi textbox, checkbox dan radiobutton.
Object Checkbox
Terdapat enam object Checkbox ("Coto", "Pallubasa", "Sop Konro", "Sop Saudara", "Konro Bakar", dan "Ulu Juku'") yang digunakan untuk menjalan formula yang telah dibuat pada menu yang dipilih.
Object Radiobutton
Terdapat dua object Radiobutton ("Pot. Member 10%", dan "Non.Member") yang digunakan untuk menjalankan formula yang berhubungan dengan potongan pada transaksi.
Script Unique

Public Class LATIHAN_06_36110030

    Private Sub coto36110030_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If coto36110030.Checked Then
            hargac36110030.ReadOnly = False
            qtyc36110030.ReadOnly = False
        Else
            hargac36110030.ReadOnly = True
            qtyc36110030.ReadOnly = True
        End If
    End Sub

    Private Sub qtyc36110030_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles qtyc36110030.TextChanged
        jumlahc36110030.Text = Val(hargac36110030.Text) * Val(qtyc36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub potmen36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles potmen36110030.CheckedChanged
        If potmen36110030.Checked Then
            member36110030.Text = Val(total36110030.Text) * (10 / 100)
            jumber36110030.Text = Val(total36110030.Text) - Val(member36110030.Text)
        End If
    End Sub

    Private Sub non36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles non36110030.CheckedChanged
        If non36110030.Checked Then
            member36110030.Text = 0
            jumber36110030.Text = Val(total36110030.Text) - Val(member36110030.Text)
        End If
    End Sub

    Private Sub pallubasa36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles pallubasa36110030.CheckedChanged
        If pallubasa36110030.Checked Then
            HP36110030.ReadOnly = False
            qtyp36110030.ReadOnly = False
        Else
            HP36110030.ReadOnly = True
            qtyp36110030.ReadOnly = True
        End If
    End Sub

    Private Sub sopkonro36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sopkonro36110030.CheckedChanged
        If sopkonro36110030.Checked Then
            hargask36110030.ReadOnly = False
            qtysk36110030.ReadOnly = False
        Else
            hargask36110030.ReadOnly = True
            qtysk36110030.ReadOnly = True
        End If
    End Sub

    Private Sub sopsaudara36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sopsaudara36110030.CheckedChanged
        If sopsaudara36110030.Checked Then
            hargass36110030.ReadOnly = False
            qtyss36110030.ReadOnly = False
        Else
            hargass36110030.ReadOnly = True
            qtyss36110030.ReadOnly = True
        End If
    End Sub

    Private Sub konrobakar36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles konrobakar36110030.CheckedChanged
        If konrobakar36110030.Checked Then
            hargakb36110030.ReadOnly = False
            qtykb36110030.ReadOnly = False
        Else
            hargakb36110030.ReadOnly = True
            qtykb36110030.ReadOnly = True
        End If
    End Sub

    Private Sub ulujuku36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ulujuku36110030.CheckedChanged
        If ulujuku36110030.Checked Then
            hargaulu36110030.ReadOnly = False
            qtyulu36110030.ReadOnly = False
        Else
            hargaulu36110030.ReadOnly = True
            qtyulu36110030.ReadOnly = True
        End If
    End Sub

    Private Sub qtyp36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles qtyp36110030.TextChanged
        jumlahp36110030.Text = Val(HP36110030.Text) * Val(qtyp36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub qtysk36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles qtysk36110030.TextChanged
        jumlahsk36110030.Text = Val(hargask36110030.Text) * Val(qtysk36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub sopsaudara36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sopsaudara36110030.TextChanged
        jumlahss36110030.Text = Val(hargass36110030.Text) * Val(qtyss36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub konrobakar36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles konrobakar36110030.TextChanged
        jumlahkb36110030.Text = Val(hargakb36110030.Text) * Val(qtykb36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub ulujuku36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ulujuku36110030.TextChanged
        jumlahulu36110030.Text = Val(hargaulu36110030.Text) * Val(qtyulu36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub coto36110030_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles coto36110030.CheckedChanged

    End Sub
End Class

Event
Checkchanged
Textchanged
Buttonclick
Property
Property textbox :
Readonly = True/False
 Prosedur Penyelesaian latihan 06

A. buka project yang telah dibuat.
B  buka Solution explorer.
C. setelah itu klik kanan nama project, pilih add dan klik new item
 

D. Setelah add new item terbuka kemudian pilih windows form di windows form ketik nama form dan add
 
E.Buatlah form seperti dibawah ini :
 
f. kemudian ganti yang kolom button and text box dan yang di perlukan  menjadi:
    coto : coto36110030
     pallubasa: pallubasa36110030
     sopkonro :sopkonro36110030 
     sopsaudara :sopsaudara36110030
     konrobakar :konrobakar36110030
     ulujuku :ulujuku36110030
     harga coto : hargac36110030
     harga pallubasa : HP36110030
     harga sop konro :hargask36110030
     harga sop saudara : hargass36110030
     harga konro bakar : hargakb36110030
     harga ulu juku : hargaulu36110030
     qty coto : qtyc36110030
     qty pallubasa :qtyp36110030
    qty sop konro : qtysk36110030
    qty sop saudara : qtyss36110030
     qty konro bakar : qtykb36110030\
     qty ulu juku : qtyulu36110030
     jumlah coto : jumlahc36110030
     jumlah pallubasa : jumlahp36110030
     jumlah sop konro : jumlask36110030
      jumlah sop saudara : jumlahss36110030
      jumlah konro bakar : jumlahkb36110030
     jumlah ulu juku   :jumlahulu36110030
     total : total36110030
    member : member36110030
    jumlah bersigh : jumber36110030
G . kemudian masukan rumus seperti ini :
           
Public Class LATIHAN_06_36110030

    Private Sub coto36110030_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        If coto36110030.Checked Then
            hargac36110030.ReadOnly = False
            qtyc36110030.ReadOnly = False
        Else
            hargac36110030.ReadOnly = True
            qtyc36110030.ReadOnly = True
        End If
    End Sub

    Private Sub qtyc36110030_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles qtyc36110030.TextChanged
        jumlahc36110030.Text = Val(hargac36110030.Text) * Val(qtyc36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub potmen36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles potmen36110030.CheckedChanged
        If potmen36110030.Checked Then
            member36110030.Text = Val(total36110030.Text) * (10 / 100)
            jumber36110030.Text = Val(total36110030.Text) - Val(member36110030.Text)
        End If
    End Sub

    Private Sub non36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles non36110030.CheckedChanged
        If non36110030.Checked Then
            member36110030.Text = 0
            jumber36110030.Text = Val(total36110030.Text) - Val(member36110030.Text)
        End If
    End Sub

    Private Sub pallubasa36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles pallubasa36110030.CheckedChanged
        If pallubasa36110030.Checked Then
            HP36110030.ReadOnly = False
            qtyp36110030.ReadOnly = False
        Else
            HP36110030.ReadOnly = True
            qtyp36110030.ReadOnly = True
        End If
    End Sub

    Private Sub sopkonro36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sopkonro36110030.CheckedChanged
        If sopkonro36110030.Checked Then
            hargask36110030.ReadOnly = False
            qtysk36110030.ReadOnly = False
        Else
            hargask36110030.ReadOnly = True
            qtysk36110030.ReadOnly = True
        End If
    End Sub

    Private Sub sopsaudara36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sopsaudara36110030.CheckedChanged
        If sopsaudara36110030.Checked Then
            hargass36110030.ReadOnly = False
            qtyss36110030.ReadOnly = False
        Else
            hargass36110030.ReadOnly = True
            qtyss36110030.ReadOnly = True
        End If
    End Sub

    Private Sub konrobakar36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles konrobakar36110030.CheckedChanged
        If konrobakar36110030.Checked Then
            hargakb36110030.ReadOnly = False
            qtykb36110030.ReadOnly = False
        Else
            hargakb36110030.ReadOnly = True
            qtykb36110030.ReadOnly = True
        End If
    End Sub

    Private Sub ulujuku36110030_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ulujuku36110030.CheckedChanged
        If ulujuku36110030.Checked Then
            hargaulu36110030.ReadOnly = False
            qtyulu36110030.ReadOnly = False
        Else
            hargaulu36110030.ReadOnly = True
            qtyulu36110030.ReadOnly = True
        End If
    End Sub

    Private Sub qtyp36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles qtyp36110030.TextChanged
        jumlahp36110030.Text = Val(HP36110030.Text) * Val(qtyp36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub qtysk36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles qtysk36110030.TextChanged
        jumlahsk36110030.Text = Val(hargask36110030.Text) * Val(qtysk36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub sopsaudara36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles sopsaudara36110030.TextChanged
        jumlahss36110030.Text = Val(hargass36110030.Text) * Val(qtyss36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub konrobakar36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles konrobakar36110030.TextChanged
        jumlahkb36110030.Text = Val(hargakb36110030.Text) * Val(qtykb36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub ulujuku36110030_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ulujuku36110030.TextChanged
        jumlahulu36110030.Text = Val(hargaulu36110030.Text) * Val(qtyulu36110030.Text)
        total36110030.Text = Val(jumlahc36110030.Text) + Val(jumlahp36110030.Text) + Val(jumlahsk36110030.Text) + Val(jumlahss36110030.Text) + Val(jumlahkb36110030.Text) + Val(jumlahulu36110030.Text)
    End Sub

    Private Sub coto36110030_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles coto36110030.CheckedChanged

    End Sub
End Class

H. setelah itu uji program dengan mengklik " star debugging "
I. setelah di uji dan program jalan maka save lah
j. selesai ^_^
 

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar