form :
listing program :
Public Class Form1
Private Sub nd_TextChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles nd.TextChanged
Select Case nd.Text
Case
"medan" : tp.Text = "toko"
Case
"pakam" : tp.Text = "rumah"
Case
"denai" : tp.Text = "swalayan"
Case
"tangguk bongkar" : tp.Text = "pabrik"
End Select
Dim x As String
x = Microsoft.VisualBasic.Mid(tp.Text,
3, 1)
Select Case tp.Text
Case
"toko" : kp.Text = "1265"
Case
"rumah" : kp.Text = "1167"
End Select
End Sub
Private Sub bl_TextChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles bl.TextChanged
End Sub
Private Sub pk_TextChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles pk.TextChanged
Select Case pk.Text
Case
"100 kwh" : bb.Text = "5000"
Case
"150 kwh" : bb.Text = "75000"
Case
"30 kwh" : bb.Text = "15000"
End Select
Dim x As String
x = Microsoft.VisualBasic.Mid(hp.Text,
3, 1)
Select Case pk.Text
Case
"1 kwh" : hp.Text = "500"
End Select
End Sub
Sub
buattabel()
lv.Columns.Add("nama
daerah", 100, HorizontalAlignment.Center)
lv.Columns.Add("type
pelanggan", 100, HorizontalAlignment.Center)
lv.Columns.Add("kode
pelanggan", 100, HorizontalAlignment.Center)
lv.Columns.Add("bulan",
100, HorizontalAlignment.Center)
lv.Columns.Add("pemakain",
100, HorizontalAlignment.Center)
lv.Columns.Add("harga
perkwh", 100, HorizontalAlignment.Center)
lv.Columns.Add("beban
biaya", 100, HorizontalAlignment.Center)
lv.Columns.Add("pajak",
100, HorizontalAlignment.Center)
lv.Columns.Add("
biaya tagihan", 100, HorizontalAlignment.Center)
lv.View = View.Details
lv.GridLines = True
lv.FullRowSelect = True
End Sub
Sub isitabel()
Dim lst
As New
ListViewItem
lst.Text = nd.Text
lst.SubItems.Add(tp.Text)
lst.SubItems.Add(kp.Text)
lst.SubItems.Add(bl.Text)
lst.SubItems.Add(pk.Text)
lst.SubItems.Add(hp.Text)
lst.SubItems.Add(bb.Text)
lst.SubItems.Add(pj.Text)
lst.SubItems.Add(bt.Text)
lv.Items.Add(lst)
End Sub
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
buattabel()
lv.Columns.Add("nama
daerah", 100, HorizontalAlignment.Center)
lv.Columns.Add("type
pelanggan", 100, HorizontalAlignment.Center)
lv.Columns.Add("kode
pelanggan", 100, HorizontalAlignment.Center)
lv.Columns.Add("bulan",
100, HorizontalAlignment.Center)
lv.Columns.Add("pemakain",
100, HorizontalAlignment.Center)
lv.Columns.Add("harga
perkwh", 100, HorizontalAlignment.Center)
lv.Columns.Add("beban
biaya", 100, HorizontalAlignment.Center)
lv.Columns.Add("pajak",
100, HorizontalAlignment.Center)
lv.Columns.Add("
biaya tagihan", 100, HorizontalAlignment.Center)
End Sub
Private Sub btnsimpan_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnsimpan.Click
isitabel()
nd.Text = ""
tp.Text = ""
kp.Text = ""
bl.Text = ""
pk.Text = ""
hp.Text = ""
bb.Text = ""
pj.Text = ""
bt.Text = ""
End Sub
Private Sub bt_KeyPress(ByVal
sender As Object,
ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles
bt.KeyPress
bt.Text = Val(bb.Text) + Val(hp.Text) *
Val(pk.Text)
End Sub
Private Sub bt_TextChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles bt.TextChanged
End Sub
End Class
hasil program
demikian postingan saya :
nama : Rizky syahputra
Npm : 1111190
Kelas : TI-P.1103
trimakasih \mesran.net
Tidak ada komentar:
Posting Komentar