14. pertemuan 14 PEMBAYARAN RUMAH SAKIT

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

APLIKASI PEMBAYARAN RUMAH SAKIT

Buat form sebagai berikut :

Ket :

No Nama Name Value


Componen
1. textbox txtNoTransaksi
2. textbox txtNamaPasien
3. comboBox cmbKodePembayaran Items :
B-001
B-002
B-003
B-004
B-005
4. Textbox txtNamaPembayaran
5. Textbox txtBiaya
6. Textbox txtJumlah
7. Textbox txttotal
8. Textbox txtDiskon
9. Textbox txtBayar
10. Textbox txtKembali
11. Button BtnHitung
12. Button BtnUlang
13. Button BtnTutup
Code Program

Double click pada cmbKodepembayaran


Private Sub cmbKodePembayaran_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles
cmbKodePembayaran.SelectedIndexChanged
Select Case cmbKodePembayaran.SelectedItem
Case "B-001"
txtNamaPembayaran.Text = "Pembayaran Biaya Rawat Inap"
txtBiaya.Text = 300000
Case "B-002"
txtNamaPembayaran.Text = "Pembayaran Biaya Rawat Jalan"
txtBiaya.Text = 100000
Case "B-003"
txtNamaPembayaran.Text = "Pembayaran Obat"
txtBiaya.Text = 50000
Case "B-004"
txtNamaPembayaran.Text = "Biaya Administrasi "
txtBiaya.Text = 30000
Case "B-005"
txtNamaPembayaran.Text = "Biaya Dokter"
txtBiaya.Text = 75000
End Select
txtJumlah.Focus()
End Sub
Double Click txtJumlah dan ubah event menjadi keypress
Private Sub txtJumlah_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtJumlah.TextChanged

End Sub

Ubah event menjadi key_press

Private Sub txtJumlah_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles


txtJumlah.KeyPress
If Asc(e.KeyChar) = 13 Then
txttotal.Text = Val(txtBiaya.Text) * Val(txtJumlah.Text)
If Val(txtJumlah.Text) >= 5 Then
txtDiskon.Text = 0.03 * Val(txttotal.Text)
Else
txtDiskon.Text = 0
End If
txtBayar.Focus()
End If
End Sub
Tombol Hitung
Private Sub BtnHitung_Click(sender As System.Object, e As System.EventArgs) Handles BtnHitung.Click
txtKembali.Text = Val(txtBayar.Text) - (Val(txttotal.Text) - Val(txtDiskon.Text))
End Sub
Tombol Ulang
Private Sub BtnUlang_Click(sender As System.Object, e As System.EventArgs) Handles BtnUlang.Click
txtNamaPasien.Clear()
cmbKodePembayaran.Text = "--Pilih--"
txtNamaPembayaran.Clear()
txtBiaya.Clear()
txtJumlah.Clear()
txttotal.Clear()
txtDiskon.Clear()
txtBayar.Clear()
txtKembali.Clear()
txtNamaPasien.Focus()
End Sub
Tombol Tutup
Private Sub BtnTutup_Click(sender As System.Object, e As System.EventArgs) Handles BtnTutup.Click
Close()
End Sub

You might also like