MATERI-MATERI MATA KULIAH SISTEM INFORMASI STMIK MDP

Pasang Iklan Gratis Disini !!!

ads ads ads ads

Senin, 16 April 2012

Aplikasi Tamu Hotel (Pra Uts)

. Senin, 16 April 2012

Desain Awal 



'DEKLARASI'
    Dim KET As String

Coding Form Awal
   'AWAL START'

        CBX_KODE.Items.Add("V")
        CBX_KODE.Items.Add("S")

        TXT_ID.Text = ""
        TXT_NAMA.Text = ""
        CBX_KODE.Text = ""
        LBL_JENIS.Text = ""
        LBL_BIAYA.Text = ""
        MTB_IN.Text = ""
        MTB_OUT.Text = ""
        LBL_LAMA.Text = ""
        LBL_POTONGAN.Text = ""
        LBL_TOTAL.Text = ""

Coding TextBox 1 (No Identitas)
If e.KeyChar = vbCr Then MaskedTextBox2.Focus()

Coding TextBox 2 ( Nama Tamu)
        If e.KeyChar =Chr (13)Then
 CBX_KODE.Focus()
        End If

Coding Combo Box Code
If CBX_KODE.Text = "V" Then
            LBL_BIAYA.Text = "300000"
            LBL_JENIS.Text = "VIP"
        ElseIf CBX_KODE.Text = "S" Then
            LBL_BIAYA.Text = "150000"
            LBL_JENIS.Text = "Standard"
        End If

KeyPress
        If e.KeyChar = Chr(13) Then
            MTB_IN.Focus()
        End If

Coding KeyPress  Masked TextBox In

        If e.KeyChar = Chr(13) Then
            MTB_OUT.Focus()
        End If
atau

If e.KeyChar = vbCr Then MaskedTextBox2.Focus()

Coding KeyPress  Masked TextBox Out
If e.KeyChar = Chr(13) Then
            LBL_LAMA.Text = DateDiff("d", MTB_IN.Text, MTB_OUT.Text)
        End If

atau
        If e.KeyChar = vbCr Then
            Label13.Text = DateDiff("d", MaskedTextBox1.Text, MaskedTextBox2.Text)
            Label13.Focus()
        End If

Coding Radio Button 1 Check Box Pelanggan
        If RBX_PELANGGAN.Checked = True Then
            KET = "Pelanggan"
            LBL_POTONGAN.Text = 10 / 100 * Val(LBL_BIAYA.Text)
            LBL_TOTAL.Text = Val(LBL_BIAYA.Text * LBL_LAMA.Text - Val(LBL_POTONGAN.Text))
        ElseIf RBX_UMUM.Checked = True Then
            KET = "Umum"
            LBL_POTONGAN.Text = 0
            LBL_TOTAL.Text = Val(LBL_BIAYA.Text * LBL_LAMA.Text - Val(LBL_POTONGAN.Text))
        End If



Coding Radio Button 2 Check Box Umum
If RBX_UMUM.Checked = True Then
            KET = "Umum"
            LBL_POTONGAN.Text = 0
            LBL_TOTAL.Text = Val(LBL_BIAYA.Text * LBL_LAMA.Text - Val(LBL_POTONGAN.Text))
        ElseIf RBX_PELANGGAN.Checked = True Then
            KET = "Pelanggan"
            LBL_POTONGAN.Text = 10 / 100 * Val(LBL_BIAYA.Text)
            LBL_TOTAL.Text = Val(LBL_BIAYA.Text * LBL_LAMA.Text - Val(LBL_POTONGAN.Text))
        End If

'BUTTON'
Coding Button Tambah
Dim daftar As ListViewItem

        If TextBox1.Text = "" Or TextBox2.Text = "" Then
            MsgBox(" Isi Data Dengan Lengkap ")
        Else
            daftar = ListView1.Items.Add(TextBox1.Text)
            daftar.SubItems.Add(TextBox2.Text)
            daftar.SubItems.Add(Label11.Text)
            daftar.SubItems.Add(Label12.Text)
            daftar.SubItems.Add(Label13.Text)
            daftar.SubItems.Add(keterangan)
            daftar.SubItems.Add(Label15.Text)
        End If

Coding Button Baru
TXT_ID.Text = ""
        TXT_NAMA.Text = ""
        CBX_KODE.Text = ""
        LBL_JENIS.Text = ""
        LBL_BIAYA.Text = ""
        MTB_IN.Text = ""
        MTB_OUT.Text = ""
        LBL_LAMA.Text = ""
        LBL_POTONGAN.Text = ""
        LBL_TOTAL.Text = ""

        TXT_ID.Focus()


Coding Button  Hapus
If ListView1.SelectedItems.Count <> 0 Then
            ListView1.Items.Remove(ListView1.SelectedItems(0))
        Else
            MsgBox("Anda Belum Memilih Item")
        End If

Coding Button Close
If MsgBox("Apakah anda benar-benar yakin ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Perhatian") = MsgBoxResult.Yes Then Me.Close()


F5 Preview






SEMOGA BERMANFAAT

2 komentar:

Rieza Harry mengatakan...

Keren
gek di Cubo
makasih Lur :)

Sisfo mengatakan...

itu aplikasi standar gan.. :D

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Posting Komentar

Tuliskan Komentar Disini..

Related Posts Plugin for WordPress, Blogger...
 
{Sistem Informasi} is proudly powered by Blogger.com | Template by : Sukriyadi | sukriyadi.blogspot.com