Jumat, 14 September 2012

latihan_6_36110036


      Deskripsi latihan_6_36110036
          A.        Object label
Terdapat tujuh label (yang bertuliskan makanan khas makasar, makanan, harga, Qty, jumlah, total, jumlah bersih).
          B.        Object textbox
Terdapat 21 textbox yang berstatus read only, Namun ketika checkbox dicek maka status read only tersebut akan berubah menjadi status input.
          C.          Object checkbox
Terdapat enam checkbox (yang bertuliskan coto, pallubasa, sop konro, sop saudara, konro bakar,  ulu juku’) yang pada saat dicek maka textbox harga dan kuantitas read onlinya akan berubah menjadi false sehingga
          D.          Object Radiobutton
Terdapat dua object button (pot. Member 10% dan non-member). radiobutton pot. Member 10% digunakan untuk memberikan potongan 10% pada total makanan yang dipesan
dan jika non-member digunakan maka total makanan yang dipesan tidak mendapatkan potongan.
          E.           Script unique
Untuk checkbox coto:

   If coto_36110036.Checked = True Then
            Qcoto_36110036.ReadOnly = False
            hcoto_36110036.ReadOnly = False
        Else
            Qcoto_36110036.ReadOnly = True
            hcoto_36110036.ReadOnly = True

        End If
Untuk radiobutton pot.member 10%:

   If True Then
            potongan_36110036.Text = 0.1 * Val(tot_36110036.Text)
            jb_36110036.Text = Val(tot_36110036.Text) - Val(potongan_36110036.Text)
  End If
Untuk radiobutton non-member:

   If True Then
            potongan_36110036.Text = 0
jb_36110036.Text = Val(tot_36110036.Text) - Val(potongan_36110036.Text)
        End If

          F.          Even
a. coto_36110036_CheckedChanged
b. pot_36110036_CheckedChanged
          G.        property
           Property TextBox ==>read only=true



Langkah-langkah mengerjakan latihan_6_36110036
1.       Buat folder baru  dimana project akan disimpan
2.       Buka Ms. Visual Studio
3.       Klik file ==> new project
4.       Ketik nama file yang ingin disimpan
5.       Kemudian akan terbuka jendela pekerjaan Ms. Visual Studio
6.       Desaign form dengan menggunakan tools pada toolbox
7.       Buat text pada form dengan menggunakan label:
a.       makanan khas makasar
b.      makanan
c.       harga
d.      Qty
e.      Jumlah
f.        Total
g.       jumlah bersih
8.       buat text pada form dengan menggunakan tombol checkbox:
a.       coto, pallubasa
b.      sop konro
c.       sop saudara
d.      konro bakar
e.      ulu juku’
9.       Buat kolom pada form dengan menggunakan textbox, sebanyak 21 kolom. Sesuai dengan desaign yang ada di latihan 6.
10.   Buat  tombol radiobutton:
     a.    Button 1 pot. Member 10%
     b.    Button 2 non-member
11.   Setelah desaign selesai dibuatlah rumusnya

                       

12.   berikut adalah rumus untuk menjalankan latihan_6_36110036

Public Class latihan_06_36110036

    Private Sub coto_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles coto_36110036.CheckedChanged
        If coto_36110036.Checked = True Then
            Qcoto_36110036.ReadOnly = False
            hcoto_36110036.ReadOnly = False
        Else
            Qcoto_36110036.ReadOnly = True
            hcoto_36110036.ReadOnly = True

        End If
    End Sub

    Private Sub pallubasa_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pallubasa_36110036.CheckedChanged
        If pallubasa_36110036.Checked = True Then
            Qpallub_36110036.ReadOnly = False
            hpallub_36110036.ReadOnly = False
        Else
            Qpallub_36110036.ReadOnly = True
            hpallub_36110036.ReadOnly = True
        End If
    End Sub

    Private Sub sopkonro_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sopkonro_36110036.CheckedChanged
        If sopkonro_36110036.Checked = True Then
            Qsopk_36110036.ReadOnly = False
            hsopk_36110036.ReadOnly = False
        Else
            Qsopk_36110036.ReadOnly = True
            hsopk_36110036.ReadOnly = True
        End If
    End Sub

    Private Sub sopsaudara_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sopsaudara_36110036.CheckedChanged
        If sopsaudara_36110036.Checked = True Then
            Qsops_36110036.ReadOnly = False
            hsops_36110036.ReadOnly = False
        Else
            Qsops_36110036.ReadOnly = True
            hsops_36110036.ReadOnly = True
        End If

    End Sub

    Private Sub konrobakar_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles konrobakar_36110036.CheckedChanged
        If konrobakar_36110036.Checked = True Then
            Qkonrob_36110036.ReadOnly = False
            hkonrob_36110036.ReadOnly = False
        Else
            Qkonrob_36110036.ReadOnly = True
            hkonrob_36110036.ReadOnly = True
        End If
    End Sub

    Private Sub ulujuku_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ulujuku_36110036.CheckedChanged
        If ulujuku_36110036.Checked = True Then
            Quluj_36110036.ReadOnly = False
            huluj_36110036.ReadOnly = False
        Else
            Quluj_36110036.ReadOnly = True
            huluj_36110036.ReadOnly = True
        End If
    End Sub

    Private Sub Qcoto_36110036_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Qcoto_36110036.TextChanged
        jcoto_36110036.Text = Val(Qcoto_36110036.Text) * Val(hcoto_36110036.Text)
        tot_36110036.Text = Val(jcoto_36110036.Text) + Val(jpallub_36110036.Text) + Val(jsopk_36110036.Text) + Val(jsops_36110036.Text) + Val(jkonrob_36110036.Text) + Val(juluj_36110036.Text)

    End Sub

    Private Sub Qpallub_36110036_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Qpallub_36110036.TextChanged
        jpallub_36110036.Text = Val(Qpallub_36110036.Text) * Val(hpallub_36110036.Text)
        tot_36110036.Text = Val(jcoto_36110036.Text) + Val(jpallub_36110036.Text) + Val(jsopk_36110036.Text) + Val(jsops_36110036.Text) + Val(jkonrob_36110036.Text) + Val(juluj_36110036.Text)
    End Sub

    Private Sub Qsopk_36110036_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Qsopk_36110036.TextChanged
        jsopk_36110036.Text = Val(Qsopk_36110036.Text) * Val(hsopk_36110036.Text)
        tot_36110036.Text = Val(jcoto_36110036.Text) + Val(jpallub_36110036.Text) + Val(jsopk_36110036.Text) + Val(jsops_36110036.Text) + Val(jkonrob_36110036.Text) + Val(juluj_36110036.Text)
    End Sub

    Private Sub Qsops_36110036_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Qsops_36110036.TextChanged
        jsops_36110036.Text = Val(Qsops_36110036.Text) * Val(hsops_36110036.Text)
        tot_36110036.Text = Val(jcoto_36110036.Text) + Val(jpallub_36110036.Text) + Val(jsopk_36110036.Text) + Val(jsops_36110036.Text) + Val(jkonrob_36110036.Text) + Val(juluj_36110036.Text)
    End Sub

    Private Sub Qkonrob_36110036_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Qkonrob_36110036.TextChanged
        jkonrob_36110036.Text = Val(Qkonrob_36110036.Text) * Val(hkonrob_36110036.Text)
        tot_36110036.Text = Val(jcoto_36110036.Text) + Val(jpallub_36110036.Text) + Val(jsopk_36110036.Text) + Val(jsops_36110036.Text) + Val(jkonrob_36110036.Text) + Val(juluj_36110036.Text)
    End Sub

    Private Sub Quluj_36110036_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Quluj_36110036.TextChanged
        juluj_36110036.Text = Val(Quluj_36110036.Text) * Val(huluj_36110036.Text)
        tot_36110036.Text = Val(jcoto_36110036.Text) + Val(jpallub_36110036.Text) + Val(jsopk_36110036.Text) + Val(jsops_36110036.Text) + Val(jkonrob_36110036.Text) + Val(juluj_36110036.Text)
    End Sub

    Private Sub pot_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pot_36110036.CheckedChanged
        If True Then
            potongan_36110036.Text = 0.1 * Val(tot_36110036.Text)
            jb_36110036.Text = Val(tot_36110036.Text) - Val(potongan_36110036.Text)
        End If
    End Sub

    Private Sub Nonpot_36110036_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nonpot_36110036.CheckedChanged
        If True Then
            potongan_36110036.Text = 0
            jb_36110036.Text = Val(tot_36110036.Text) - Val(potongan_36110036.Text)
        End If
    End Sub

13.   setelah itu program dijalankan

Tidak ada komentar:

Posting Komentar