Public Class Form1
Private Sub Form1_Load
jumlah lembar.items.Add(999)
harga perlembar.items.Add(999)
end sub
Dim X as string
Dim Y as string
X=microsoft.visual basic.left (jumlah lembar,999)
y=microsoft.visual basic.right(harga perlembar,999)
select case X
case HPL: HPL.text="200/100"
case HPL: HPL.text="200/100"
end select Y
case"999"=jumlah lembar.text=999
case"999"=harga perlembar=999
end select.
Private Sub discount_SelectedIndexChanged
Select Case jumlah perlembar.Text
Case "jumlah lembar" : harga perlembar.Text =100
Case "discount" : harga perlembar.Text = 999
Case "pembayaran" : discount.Text = 9999999
HPL.Text = HPL*999
End Sub
Private Sub S_SelectedIndexChange
Select Case S.Text
Case "HPL" : harga perlembar.Text = HPL*jumlah
Case "pembayaran" : total-discount
End Select
End Sub
Private Sub harga perlembar_Sel
If jumlah lembar.Text = 1 And harga perlembar.Text = "999" Then
harga perlembar.Text = HPL * jumlah
ElseIf jumlah lembar.Text >= 2 And S.Text = "harga perlembar" Then
harga lembar.Text = HPL*jumlah
Else
harga lembar.Text = ""
End If
End Sub
Private Sub BtnPROSES_Click
If jumlah perlembar.Text = "999" Then
HpL.Text =100
ElseIf Jumlah perlembar.Text = "999" Then
HPL.Text = 100
ElseIf jumlah perlembar.Text = "999" Then
HpL.Text =100
Else
HL.Text = ""
End If
jumlah.Text = Val(HPl.Text * Jumlah lembar.Text) + Val(Total harga.Text) + Val(Discount.Text) + Val(pembayaran.Text)
End Sub
Private Sub BtnKELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnKELUAR.Click
End
End Sub
Private Sub BtnBaru_Cli
jumlah.Text = ""
jumlah lembar.Text = ""
total perlembar.Text = ""
total harga.Text = ""
discount.Text = ""
pembayaran.Text = ""
End Sub
Sub buattabel()
Lv.Columns.Add("jumlah lembar", 50, HorizontalAlignment.Left)
Lv.Columns.Add("total lembar", 80, HorizontalAlignment.Left)
Lv.Columns.Add("total harga", 120, HorizontalAlignment.Left)
Lv.Columns.Add("discount", 120, HorizontalAlignment.Left)
Lv.Columns.Add("pembayaran", 120, HorizontalAlignment.Left)
Lv.View = View.Details
Lv.GridLines = True
Lv.FullRowSelect = True
End Sub
Sub isitabel()
Dim lst As New ListViewItem
lst.Text = Nik.Text
lst.SubItems.Add(jumlah lembar.Text)
lst.SubItems.Add(harga perlmbar.Text)
lst.SubItems.Add(total harga.Text)
lst.SubItems.Add(discount.Text)
lst.SubItems.Add(pembayaran.Text)
Lv.Items.Add(lst)
End Sub
Private Sub Simpan_Click
isitabel()
End Sub
Private Sub Hapusygdipilih_Cl
LV.Items.Remove(LV.SelectedItems(0))
End Sub
Private Sub Hapussemua_Click
LV.Items.Clear()
End Sub
Private Sub Btnout_Cli
Me.Close()
End Sub
Tidak ada komentar:
Posting Komentar