Praktikum 3 Vb.Net (perhotalan) - Owh Bulet

Owh Bulet

Berbagi apa saja : Game | Sofware | Tips & Trick | E-book | Informasi | Sourcode PHP | Dan Lain-lainya

7/11/2013

Praktikum 3 Vb.Net (perhotalan)

Hay Sahabat Sekalian, Kali Ini Saya akan Membahas Tetang Materi Kuliah Visual Basic,
Seperti Ini tampilan di Formnya, silakan buat seperti diatas.









Listingnya Silakan sesuaikan seperti Dibawah ini

Public Sub Ceknokamar()
        If cnokamar.Text <> "" Then
            Select Case cnokamar.Text
                Case "A01"
                    rbstandart.Checked = True
                    cbac.Checked = True
                    cbsinglebed.Checked = True
                    tbyinap.Text = "150000"
                Case "B02"
                    rbstandart.Checked = True
                    cbsinglebed.Checked = True
                    cbtv.Checked = True
                    tbyinap.Text = "150000"
                Case "C01"
                    rbsuperior.Checked = True
                    cbac.Checked = True
                    cbtv.Checked = True
                    cbsinglebed.Checked = True
                    tbyinap.Text = "200000"
                Case "D01"
                    rbsuperior.Checked = True
                    cbac.Checked = True
                    cbtv.Checked = True
                    cbsinglebed.Checked = True
                    tbyinap.Text = "200000"
                Case "E01"
                    rbdeluxe.Checked = True
                    cbac.Checked = True
                    cbtv.Checked = True
                    cbkulkas.Checked = True
                    cbdoublebed.Checked = True
                    tbyinap.Text = "250000"
                Case "f01"
                    rbdeluxe.Checked = True
                    cbac.Checked = True
                    cbtv.Checked = True
                    cbdoublebed.Checked = True
                    tbyinap.Text = "250000"

            End Select
        End If
        tblminap.Focus()
    End Sub


Pada Tombol Keluar Silakan Isi seperti di bawah ini :

Private Sub btkeluar_Click(sender As Object, e As EventArgs) Handles btkeluar.Click
        Close()
    End Sub


Pada Tombol Baru silakan Isi Seperti Di bawah ini :

Private Sub btbaru_Click(sender As Object, e As EventArgs) Handles btbaru.Click
        cnokamar.Text = "--Pilih--"
        rbstandart.Checked = False
        rbsuperior.Checked = False
        rbdeluxe.Checked = False
        cbac.Checked = False
        cbtv.Checked = False
        cbkulkas.Checked = False
        cbsinglebed.Checked = False
        cbdoublebed.Checked = False
        tbyinap.Clear()
        tblminap.Clear()
        tbtbinap.Clear()
        tbuangbyr.Clear()
        tbuangkmbli.Clear()
    End Sub


Silakan Buat sub baru masukan seperti di bawah ini :

Private Sub cnokamar_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cnokamar.SelectedIndexChanged
        Ceknokamar()
    End Sub


Private Sub tblminap_KeyPress(sender As Object, e As KeyPressEventArgs) Handles tblminap.KeyPress
        If e.KeyChar = Chr(13) Then
            tbtbinap.Text = Val(tblminap.Text) * Val(tbyinap.Text)
            tbuangbyr.Focus()
        End If
    End Sub

    Private Sub tbuangbyr_KeyPress(sender As Object, e As KeyPressEventArgs) Handles tbuangbyr.KeyPress
        If e.KeyChar = Chr(13) Then
            tbuangkmbli.Text = Val(tbuangbyr.Text) - Val(tbtbinap.Text)
        End If
    End Sub


yang Ingin download filenya silakan klik di bawah ini :
Downloada Praktikum3
Passwordnya : aarware.com

No comments:

Post a Comment

Harap Berkomentar Dengan Sopan Bro...