0% found this document useful (0 votes)
13 views2 pages

Uts Gadisa Sariah 25303004

The document is a Visual Basic code for a form that allows users to select medical items and calculate costs based on selected quantities. It includes item codes, descriptions, categories, prices, and applies discounts for surgical items. The form also features a reset function to clear all fields for new entries.

Uploaded by

San Kere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Uts Gadisa Sariah 25303004

The document is a Visual Basic code for a form that allows users to select medical items and calculate costs based on selected quantities. It includes item codes, descriptions, categories, prices, and applies discounts for surgical items. The form also features a reset function to clear all fields for new entries.

Uploaded by

San Kere
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Nama: Shifa Yulieta

NPM : 25303003
Kelas:RMIK-XR-31/25
Public Class Form1

Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Label6.Click

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Kode.Items.Add("D01")
Kode.Items.Add("M01")
Kode.Items.Add("S01")
End Sub

Private Sub Kode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles Kode.SelectedIndexChanged
Select Case Kode.SelectedItem
Case "D01"
Barang.Text = "Stethoscope General Care Premier"
Kategori.Text = "Disease Diagnosis"
Harga.Text = Format(75000, "###,###.#")
Case "M01"
Barang.Text = "Spuit Gliserin"
Kategori.Text = "Medical Treatment"
Harga.Text = Format(110000, "###,###.#")
Case "S01"
Barang.Text = "Quire Foreign Body Remover Forcep"
Kategori.Text = "Surgical Operation"
Harga.Text = Format(186000, "###,###.#")
End Select
End Sub

Private Sub Hitung_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Hitung.Click
Subtotal.Text = Format(Harga.Text * Jumlah.Text, "###,###.#")
If Kategori.Text = "Surgical Operation" Then
Potongan.Text = Format(Subtotal.Text * 0.065, "###,###.#")
Else
Potongan.Text = 0

End If
Total.Text = Format(Convert.ToDouble(Subtotal.Text) -
Convert.ToDouble(Potongan.Text), "###,###.#")
Ulangi.Focus()
End Sub

Private Sub Ulangi_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Ulangi.Click
Kode.Text = ""
Barang.Text = ""
Kategori.Text = ""
Harga.Text = ""
Jumlah.Text = ""
Subtotal.Text = ""
Potongan.Text = ""
Total.Text = ""
End Sub

Private Sub Jumlah_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles Jumlah.KeyPress
If Not ((e.KeyChar >= "0" And e.KeyChar <= "9") Or e.KeyChar = vbBack)
Then e.Handled = True
If Asc(e.KeyChar) = Keys.Enter Then
Hitung.Focus()
End If
End Sub

End Class

You might also like