www.mesran.blogspot.com/2013/06/contoh-kasus-pemrograman-pemakaiann-listrik.html
berikut jawaban program :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
BuatTabel()
End Sub
Sub BuatTabel()
LV.Columns.Add("ID PELANGGAN", 80, HorizontalAlignment.Center)
LV.Columns.Add("NAMA", 180, HorizontalAlignment.Left)
LV.Columns.Add("ALAMAT", 80, HorizontalAlignment.Center)
LV.Columns.Add("TARIF VA", 80, HorizontalAlignment.Center)
LV.View = View.Details
LV.GridLines = True
LV.FullRowSelect = True
BLN.Items.Add("JANUARI")
BLN.Items.Add("FEBRUARI")
BLN.Items.Add("MARET")
BLN.Items.Add("APRIL")
BLN.Items.Add("MEI")
BLN.Items.Add("JUNI")
BLN.Items.Add("JULI")
BLN.Items.Add("AGUSTUS")
BLN.Items.Add("SEPTEMBER")
BLN.Items.Add("OKTOBER")
BLN.Items.Add("NOVEMBER")
BLN.Items.Add("DESEMBER")
THN.Items.Add("2010")
THN.Items.Add("2011")
THN.Items.Add("2012")
THN.Items.Add("2013")
THN.Items.Add("2014")
End Sub
Sub IsiTabel()
Dim lst As New ListViewItem
lst.Text = ID.Text
lst.SubItems.Add(NAMA.Text)
lst.SubItems.Add(ALAMAT.Text)
lst.SubItems.Add(TARIF.Text)
LV.Items.Add(lst)
End Sub
Private Sub BTNSIMPANKELISTVIEW_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNSIMPANKELISTVIEW.Click
IsiTabel()
ID.Text = " "
NAMA.Text = " "
ALAMAT.Text = " "
TARIF.Text = " "
End Sub
Private Sub BTNCARI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTNCARI.Click
Dim x As String
THN.Text = "2010"
Microsoft.VisualBasic.Left(ID.Text, 2)
x = Microsoft.VisualBasic.Mid(ID.Text, 3, 1)
If x = "1" Then
NAMA.Text = " puji lestari "
ElseIf x = "3" Then
NAMA.Text = " friska pratiwi "
ElseIf x = " 4 " Then
NAMA.Text = " suvita sari "
End If
x = Microsoft.VisualBasic.Mid(ID.Text, 4, 2)
If x = "10" Then
ALAMAT.Text = " perbaungan "
ElseIf x = "11" Then
ALAMAT.Text = " pakam "
ElseIf x = " 12 " Then
ALAMAT.Text = " medan "
End If
If x = "2010" Then
TARIF.Text = " 20000 "
ElseIf x = "2011" Then
TARIF.Text = " 25000 "
ElseIf x = " 2012 " Then
TARIF.Text = " 30000 "
End If
End Sub
End Class
http://mesran.net/
Home »
» Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net
Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net
Posted by puji lestari
Posted on 00.18
with No comments
Written by : Puji - Berbagi bersama...!!!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam id libero non erat fermentum varius eget at elit. Suspendisse vel mattis diam. Ut sed dui in lectus hendrerit interdum nec ac neque. Praesent a metus eget augue lacinia accumsan ullamcorper sit amet tellus.
Join Me On: Facebook | Twitter | Google Plus :: Thank you for visiting ! ::
0 komentar:
Posting Komentar