Sabtu, 29 Oktober 2011
Minggu, 23 Oktober 2011
Minggu, 16 Oktober 2011
Apkom 4 Latihan 15
Scrift Milik Zani Accounting 2008 D3 A ==> Selamat belajar semuanya!!!
Public Class LATIHAN015012
'DEKLARASI CONECTION
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
'deklarasi data tabel
Dim DT As New DataTable
Private Sub LATIHAN_015_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'deklarasi adapter
Dim nisa As New OleDb.OleDbDataAdapter
nisa = New OleDb.OleDbDataAdapter("select * from barang", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
DT.Rows.Clear() 'membersihkan data table
nisa.Fill(DT) 'mengisi database ke dlm data table
DataGridView1.DataSource = DT 'memunculkan dlm datagridview
nisa.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake
End Sub
End Class
Public Class LATIHAN015012
'DEKLARASI CONECTION
Dim CONECT As New OleDb.OleDbConnection("provider=microsoft.ace.oledb.12.0;data source= " & Application.StartupPath & "\datatransaksijualbeli.accdb")
'deklarasi data tabel
Dim DT As New DataTable
Private Sub LATIHAN_015_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'deklarasi adapter
Dim nisa As New OleDb.OleDbDataAdapter
nisa = New OleDb.OleDbDataAdapter("select * from barang", CONECT) 'mkemunculkan semua data dari tabel barang dlm acces
DT.Rows.Clear() 'membersihkan data table
nisa.Fill(DT) 'mengisi database ke dlm data table
DataGridView1.DataSource = DT 'memunculkan dlm datagridview
nisa.Dispose() 'menghancurkan kendaraan (adapter) yg sdh dipake
End Sub
End Class
Apkom 4 Latihan 14
Milik Zani Accounting 2008 D3 A ==> scrift ini belu selesai sepenuhnya, silahkan lengkapi!!!
Public Class Latihan014012
'MEMBUATKAN DEKLARASI SUATU TABEL
Dim YAYA As New DataTable
'MEMBUATKAN DEKLARASI SUATU DATAVIEW
Dim DV As New DataView
Private Sub Latihan14012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'MEMBUATKAN KOLOM DALAM DATATABLE
YAYA.Columns.Add(New DataColumn("Stambuk", GetType(String)))
YAYA.Columns.Add(New DataColumn("Nama", GetType(String)))
YAYA.Columns.Add(New DataColumn("JenisKelamin", GetType(String)))
YAYA.Columns.Add(New DataColumn("TanggalLahir", GetType(String)))
YAYA.Columns.Add(New DataColumn("GajiOrtu", GetType(Double)))
YAYA.Columns.Add(New DataColumn("Kelas", GetType(String)))
'DATA YANG DIMASUKKAN DLM DATATABLE
YAYA.Rows.Add("36109001", "APRILYADI", "L", "30/4/1991", 4468000, "1 A")
YAYA.Rows.Add("36109002", "ANDI MUSWIRAHMA", "P", "1/12/1991", 5979000, "1 A")
YAYA.Rows.Add("36109003", "SOEDARMANTO", "L", "27/4/1991", 6185000, "1 A")
YAYA.Rows.Add("36109004", "HARDIANA", "P", "5/7/1990", 1552000, "1 A")
YAYA.Rows.Add("36109005", "ISMI FEBRIANI A", "P", "4/2/1992", 4519000, "1 A")
YAYA.Rows.Add("36109006", "MUHAMMAD HARUN HAMID", "L", "21/3/1992", 2121000, "1 A")
YAYA.Rows.Add("36109007", "FEBRIANTY SURYA NINGTYAS", "P", "21/2/1991", 2632000, "1 A")
YAYA.Rows.Add("36109008", "B. NURANISA PERTIWI", "P", "10/10/1991", 4640000, "1 A")
YAYA.Rows.Add("36109009", "ALWIYAH", "P", "5/7/1991", 3037000, "1 A")
YAYA.Rows.Add("36109010", "RUSNANINGSI RUSLAN", "P", "6/9/1990", 2225000, "1 A")
YAYA.Rows.Add("36109011", "KARTIKA SEPTIANI", "P", "22/9/1991", 2364000, "1 A")
YAYA.Rows.Add("36109012", "RENI KUSUMA NINGRUM", "P", "30/3/1991", 6798000, "1 A")
YAYA.Rows.Add("36109013", "NURFAHNY", "P", "27/3/1991", 6943000, "1 A")
YAYA.Rows.Add("36109014", "ANDI TENRI WEWANG", "P", "21/10/1991", 5173000, "1 A")
YAYA.Rows.Add("36109015", "RIDHAYANTI SALEH", "P", "29/11/1990", 6181000, "1 A")
YAYA.Rows.Add("36109016", "HASTUTI", "P", "17/11/1990", 5382000, "1 A")
YAYA.Rows.Add("36109017", "IFTAH URFIANA", "P", "8/8/1991", 4331000, "1 A")
YAYA.Rows.Add("36109018", "AGUS SALIM", "L", "18/8/1991", 1795000, "1 A")
YAYA.Rows.Add("36109019", "ANDI WAHYUNI", "P", "10/7/1992", 1173000, "1 A")
YAYA.Rows.Add("36109020", "SRI RAHMAYANTI ANSAR", "P", "26/2/1992", 2394000, "1 A")
YAYA.Rows.Add("36109021", "AMI NURUL IRMA", "P", "13/9/1991", 3191000, "1 A")
YAYA.Rows.Add("36109022", "RACHMIYATI", "P", "16/7/1990", 2311000, "1 A")
YAYA.Rows.Add("36109023", "AMELIA INDAHSARI", "P", "27/8/1991", 5850000, "1 A")
YAYA.Rows.Add("36109024", "OTNIEL P. PANGKUNG", "L", "24/10/1991", 1859000, "1 A")
YAYA.Rows.Add("36109025", "SITTI SYAMSIAH", "P", "11/6/1991", 2247000, "1 A")
YAYA.Rows.Add("36109026", "IWAN", "L", "15/5/1991", 2790000, "1 A")
YAYA.Rows.Add("36109027", "FITRIYAH INSANI", "P", "13/5/1991", 4203000, "1 A")
YAYA.Rows.Add("36109028", "TUMIM OKTAVIANI TOMBI", "P", "17/10/1991", 2943000, "1 A")
YAYA.Rows.Add("36109029", "HAPSARI INDAH PRATITIS", "P", "24/4/1991", 3503000, "1 B")
YAYA.Rows.Add("36109030", "ASRUL SANIE", "L", "8/6/1986", 6834000, "1 B")
YAYA.Rows.Add("36109031", "IRNA YUNI SARI", "P", "6/12/1990", 4974000, "1 B")
YAYA.Rows.Add("36109032", "MIRASTHI BATO TAMPAK", "P", "12/8/1990", 3574000, "1 B")
YAYA.Rows.Add("36109033", "PRATIWI LEILA SAFILA", "P", "7/7/1991", 3444000, "1 B")
YAYA.Rows.Add("36109034", "NURHIDAYAH", "P", "31/5/1990", 6194000, "1 B")
YAYA.Rows.Add("36109035", "ANDI HABIBI", "L", "1/1/1992", 2054000, "1 B")
YAYA.Rows.Add("36109036", "IBNU AZHAR", "L", "12/1/1991", 3005000, "1 B")
YAYA.Rows.Add("36109037", "JUNIATI MUSLIMIN", "P", "2/6/1991", 5391000, "1 B")
YAYA.Rows.Add("36109038", "NURUL AZIZAH MUSLIMIN", "P", "20/9/1991", 1384000, "1 B")
YAYA.Rows.Add("36109039", "MUSDALIFA", "P", "4/11/1991", 3884000, "1 B")
YAYA.Rows.Add("36109040", "ARMITA", "P", "17/9/1990", 1557000, "1 B")
YAYA.Rows.Add("36109041", "MUHAMMAD FARID RAMLI", "L", "12/4/1991", 2122000, "1 B")
YAYA.Rows.Add("36109042", "MUHAMMAD RIJAL", "L", "28/11/1991", 6075000, "1 B")
YAYA.Rows.Add("36109043", "KHAERIL ILYAS", "L", "29/7/1991", 1422000, "1 B")
YAYA.Rows.Add("36109044", "MAGFIRAH", "P", "21/6/1991", 4097000, "1 B")
YAYA.Rows.Add("36109045", "LARA CANDRASARI", "P", "25/12/1992", 1265000, "1 B")
YAYA.Rows.Add("36109046", "ESHAFITRI", "P", "21/6/1992", 2541000, "1 B")
YAYA.Rows.Add("36109047", "NELA FRANSISCA RAMBING", "P", "12/12/1991", 2707000, "1 B")
YAYA.Rows.Add("36109048", "TRIES NOVIANTY PANGGOA", "P", "13/11/1989", 2572000, "1 B")
YAYA.Rows.Add("36109049", "WIRDA PAULUS", "P", "16/9/1991", 1692000, "1 B")
YAYA.Rows.Add("36109050", "NIDERIA", "P", "26/12/1991", 1856000, "1 B")
YAYA.Rows.Add("36109051", "NOVIANI MALNAN", "P", "16/3/1990", 4431000, "1 B")
YAYA.Rows.Add("36109052", "EVY FAJRIANTI JAUHARI", "P", "29/9/1991", 4140000, "1 B")
YAYA.Rows.Add("36109053", "DEDE PRADITYA KONDOLELE", "L", "7/7/1991", 1478000, "1 B")
YAYA.Rows.Add("36109054", "SUKMAWAN", "L", "13/9/1991", 6233000, "1 B")
YAYA.Rows.Add("36109055", "MUH. NURFALAH YUSUF", "L", "24/12/1991", 6611000, "1 B")
YAYA.Rows.Add("36109056", "HASBIYA", "P", "25/5/1990", 2721000, "1 B")
YAYA.Rows.Add("36109057", "FATMA SARI", "P", "17/12/1991", 2508000, "1 C")
YAYA.Rows.Add("36109058", "NURWAHYUNA SANGGA", "P", "4/10/1990", 4180000, "1 C")
YAYA.Rows.Add("36109059", "KARTIKA", "P", "22/8/1990", 3573000, "1 C")
YAYA.Rows.Add("36109060", "SARCE RATNA TALIA", "P", "24/12/1990", 5108000, "1 C")
YAYA.Rows.Add("36109061", "LILIS MULYANI", "P", "21/9/1991", 3970000, "1 C")
YAYA.Rows.Add("36109062", "URIM OKTVIANA TOMBI", "P", "16/10/1991", 2525000, "1 C")
YAYA.Rows.Add("36109063", "NURUL ILMI D.M.", "P", "8/5/1991", 5183000, "1 C")
YAYA.Rows.Add("36109064", "FEBY WINRIANI S", "P", "11/2/1991", 4765000, "1 C")
YAYA.Rows.Add("36109065", "YULIANI A.", "P", "21/1/1992", 6216000, "1 C")
YAYA.Rows.Add("36109066", "HIJRAH KHERANA", "P", "18/7/1990", 5425000, "1 C")
YAYA.Rows.Add("36109067", "MEDO VALENTINE FEBRIANI I L", "P", "16/2/1992", 4451000, "1 C")
YAYA.Rows.Add("36109068", "HASNIATY MATARRU", "P", "21/5/1991", 1029000, "1 C")
YAYA.Rows.Add("36109069", "DANANG PRAYUDHA DWI E", "L", "6/7/1991", 2492000, "1 C")
YAYA.Rows.Add("36109070", "GUNAWAN MUSTARI", "L", "15/9/1991", 5692000, "1 C")
YAYA.Rows.Add("36109071", "TRIO WIJAYA PUTRA Y", "L", "8/8/1991", 3889000, "1 C")
YAYA.Rows.Add("36109072", "OKTAVIANI REGINA OGELANG", "P", "5/10/1991", 4075000, "1 C")
YAYA.Rows.Add("36109073", "EVIANTY KRISTINA LAYUCK", "P", "10/5/1991", 2549000, "1 C")
YAYA.Rows.Add("36109074", "KRISNAWATI SAMAN", "P", "6/9/1991", 2692000, "1 C")
YAYA.Rows.Add("36109075", "PUTRY ALFATIHAH", "P", "19/11/1991", 1847000, "1 C")
YAYA.Rows.Add("36109076", "A A GEDE DALEM P PUTRA", "L", "12/12/1991", 1109000, "1 C")
YAYA.Rows.Add("36109077", "MUHAMMAD NUR", "L", "9/4/1990", 2133000, "1 C")
YAYA.Rows.Add("36109078", "NURUDZDZAKIYYAH F", "P", "23/4/1992", 5900000, "1 C")
YAYA.Rows.Add("36109079", "CATHERINE PARUBAK", "P", "25/5/1991", 2115000, "1 C")
YAYA.Rows.Add("36109080", "JUMADI", "L", "14/10/1989", 2185000, "1 C")
YAYA.Rows.Add("36109081", "YUSRIANTO SAMBARA", "L", "16/1/1991", 3120000, "1 C")
YAYA.Rows.Add("36109082", "ADHE RHEZA SAHRUL ZAIN", "L", "11/10/1990", 1770000, "1 C")
YAYA.Rows.Add("36109083", "CHAIRUL ICHSAN", "L", "23/11/1991", 2501000, "1 C")
YAYA.Rows.Add("36109084", "FITRAH ADITYA HANAPI", "L", "11/4/1991", 5381000, "1 C")
'MENGATUR DATATABLE YG AKAN DIVIEW OLEH DATAVIEW
DV = YAYA.DefaultView
'UNTUK MENAMPILKAN DLM DATAGRIDVIEW
DataGridView1.DataSource = DV
End Sub
' untuk memsortir data untk semua radio button
Private Sub Stb_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stb.CheckedChanged
If stb.Checked = True Then
DV.Sort = "Stambuk"
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
DV.Sort = "kelas desc"
End If
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
DV.Sort = "kelas,tanggalLahir"
End If
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
If RadioButton3.Checked = True Then
DV.Sort = "GajiOrtu desc"
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
DV.RowFilter = "[Gaji Ortu]>=" & Val(TextBox1.Text)
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
DV.RowFilter = "Kelas <> '" & TextBox2.Text & "'"
End Sub
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
DV.RowFilter = "[Tanggal Lahir] < #" & DateTimePicker1.Value.Date & "#"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class
Public Class Latihan014012
'MEMBUATKAN DEKLARASI SUATU TABEL
Dim YAYA As New DataTable
'MEMBUATKAN DEKLARASI SUATU DATAVIEW
Dim DV As New DataView
Private Sub Latihan14012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'MEMBUATKAN KOLOM DALAM DATATABLE
YAYA.Columns.Add(New DataColumn("Stambuk", GetType(String)))
YAYA.Columns.Add(New DataColumn("Nama", GetType(String)))
YAYA.Columns.Add(New DataColumn("JenisKelamin", GetType(String)))
YAYA.Columns.Add(New DataColumn("TanggalLahir", GetType(String)))
YAYA.Columns.Add(New DataColumn("GajiOrtu", GetType(Double)))
YAYA.Columns.Add(New DataColumn("Kelas", GetType(String)))
'DATA YANG DIMASUKKAN DLM DATATABLE
YAYA.Rows.Add("36109001", "APRILYADI", "L", "30/4/1991", 4468000, "1 A")
YAYA.Rows.Add("36109002", "ANDI MUSWIRAHMA", "P", "1/12/1991", 5979000, "1 A")
YAYA.Rows.Add("36109003", "SOEDARMANTO", "L", "27/4/1991", 6185000, "1 A")
YAYA.Rows.Add("36109004", "HARDIANA", "P", "5/7/1990", 1552000, "1 A")
YAYA.Rows.Add("36109005", "ISMI FEBRIANI A", "P", "4/2/1992", 4519000, "1 A")
YAYA.Rows.Add("36109006", "MUHAMMAD HARUN HAMID", "L", "21/3/1992", 2121000, "1 A")
YAYA.Rows.Add("36109007", "FEBRIANTY SURYA NINGTYAS", "P", "21/2/1991", 2632000, "1 A")
YAYA.Rows.Add("36109008", "B. NURANISA PERTIWI", "P", "10/10/1991", 4640000, "1 A")
YAYA.Rows.Add("36109009", "ALWIYAH", "P", "5/7/1991", 3037000, "1 A")
YAYA.Rows.Add("36109010", "RUSNANINGSI RUSLAN", "P", "6/9/1990", 2225000, "1 A")
YAYA.Rows.Add("36109011", "KARTIKA SEPTIANI", "P", "22/9/1991", 2364000, "1 A")
YAYA.Rows.Add("36109012", "RENI KUSUMA NINGRUM", "P", "30/3/1991", 6798000, "1 A")
YAYA.Rows.Add("36109013", "NURFAHNY", "P", "27/3/1991", 6943000, "1 A")
YAYA.Rows.Add("36109014", "ANDI TENRI WEWANG", "P", "21/10/1991", 5173000, "1 A")
YAYA.Rows.Add("36109015", "RIDHAYANTI SALEH", "P", "29/11/1990", 6181000, "1 A")
YAYA.Rows.Add("36109016", "HASTUTI", "P", "17/11/1990", 5382000, "1 A")
YAYA.Rows.Add("36109017", "IFTAH URFIANA", "P", "8/8/1991", 4331000, "1 A")
YAYA.Rows.Add("36109018", "AGUS SALIM", "L", "18/8/1991", 1795000, "1 A")
YAYA.Rows.Add("36109019", "ANDI WAHYUNI", "P", "10/7/1992", 1173000, "1 A")
YAYA.Rows.Add("36109020", "SRI RAHMAYANTI ANSAR", "P", "26/2/1992", 2394000, "1 A")
YAYA.Rows.Add("36109021", "AMI NURUL IRMA", "P", "13/9/1991", 3191000, "1 A")
YAYA.Rows.Add("36109022", "RACHMIYATI", "P", "16/7/1990", 2311000, "1 A")
YAYA.Rows.Add("36109023", "AMELIA INDAHSARI", "P", "27/8/1991", 5850000, "1 A")
YAYA.Rows.Add("36109024", "OTNIEL P. PANGKUNG", "L", "24/10/1991", 1859000, "1 A")
YAYA.Rows.Add("36109025", "SITTI SYAMSIAH", "P", "11/6/1991", 2247000, "1 A")
YAYA.Rows.Add("36109026", "IWAN", "L", "15/5/1991", 2790000, "1 A")
YAYA.Rows.Add("36109027", "FITRIYAH INSANI", "P", "13/5/1991", 4203000, "1 A")
YAYA.Rows.Add("36109028", "TUMIM OKTAVIANI TOMBI", "P", "17/10/1991", 2943000, "1 A")
YAYA.Rows.Add("36109029", "HAPSARI INDAH PRATITIS", "P", "24/4/1991", 3503000, "1 B")
YAYA.Rows.Add("36109030", "ASRUL SANIE", "L", "8/6/1986", 6834000, "1 B")
YAYA.Rows.Add("36109031", "IRNA YUNI SARI", "P", "6/12/1990", 4974000, "1 B")
YAYA.Rows.Add("36109032", "MIRASTHI BATO TAMPAK", "P", "12/8/1990", 3574000, "1 B")
YAYA.Rows.Add("36109033", "PRATIWI LEILA SAFILA", "P", "7/7/1991", 3444000, "1 B")
YAYA.Rows.Add("36109034", "NURHIDAYAH", "P", "31/5/1990", 6194000, "1 B")
YAYA.Rows.Add("36109035", "ANDI HABIBI", "L", "1/1/1992", 2054000, "1 B")
YAYA.Rows.Add("36109036", "IBNU AZHAR", "L", "12/1/1991", 3005000, "1 B")
YAYA.Rows.Add("36109037", "JUNIATI MUSLIMIN", "P", "2/6/1991", 5391000, "1 B")
YAYA.Rows.Add("36109038", "NURUL AZIZAH MUSLIMIN", "P", "20/9/1991", 1384000, "1 B")
YAYA.Rows.Add("36109039", "MUSDALIFA", "P", "4/11/1991", 3884000, "1 B")
YAYA.Rows.Add("36109040", "ARMITA", "P", "17/9/1990", 1557000, "1 B")
YAYA.Rows.Add("36109041", "MUHAMMAD FARID RAMLI", "L", "12/4/1991", 2122000, "1 B")
YAYA.Rows.Add("36109042", "MUHAMMAD RIJAL", "L", "28/11/1991", 6075000, "1 B")
YAYA.Rows.Add("36109043", "KHAERIL ILYAS", "L", "29/7/1991", 1422000, "1 B")
YAYA.Rows.Add("36109044", "MAGFIRAH", "P", "21/6/1991", 4097000, "1 B")
YAYA.Rows.Add("36109045", "LARA CANDRASARI", "P", "25/12/1992", 1265000, "1 B")
YAYA.Rows.Add("36109046", "ESHAFITRI", "P", "21/6/1992", 2541000, "1 B")
YAYA.Rows.Add("36109047", "NELA FRANSISCA RAMBING", "P", "12/12/1991", 2707000, "1 B")
YAYA.Rows.Add("36109048", "TRIES NOVIANTY PANGGOA", "P", "13/11/1989", 2572000, "1 B")
YAYA.Rows.Add("36109049", "WIRDA PAULUS", "P", "16/9/1991", 1692000, "1 B")
YAYA.Rows.Add("36109050", "NIDERIA", "P", "26/12/1991", 1856000, "1 B")
YAYA.Rows.Add("36109051", "NOVIANI MALNAN", "P", "16/3/1990", 4431000, "1 B")
YAYA.Rows.Add("36109052", "EVY FAJRIANTI JAUHARI", "P", "29/9/1991", 4140000, "1 B")
YAYA.Rows.Add("36109053", "DEDE PRADITYA KONDOLELE", "L", "7/7/1991", 1478000, "1 B")
YAYA.Rows.Add("36109054", "SUKMAWAN", "L", "13/9/1991", 6233000, "1 B")
YAYA.Rows.Add("36109055", "MUH. NURFALAH YUSUF", "L", "24/12/1991", 6611000, "1 B")
YAYA.Rows.Add("36109056", "HASBIYA", "P", "25/5/1990", 2721000, "1 B")
YAYA.Rows.Add("36109057", "FATMA SARI", "P", "17/12/1991", 2508000, "1 C")
YAYA.Rows.Add("36109058", "NURWAHYUNA SANGGA", "P", "4/10/1990", 4180000, "1 C")
YAYA.Rows.Add("36109059", "KARTIKA", "P", "22/8/1990", 3573000, "1 C")
YAYA.Rows.Add("36109060", "SARCE RATNA TALIA", "P", "24/12/1990", 5108000, "1 C")
YAYA.Rows.Add("36109061", "LILIS MULYANI", "P", "21/9/1991", 3970000, "1 C")
YAYA.Rows.Add("36109062", "URIM OKTVIANA TOMBI", "P", "16/10/1991", 2525000, "1 C")
YAYA.Rows.Add("36109063", "NURUL ILMI D.M.", "P", "8/5/1991", 5183000, "1 C")
YAYA.Rows.Add("36109064", "FEBY WINRIANI S", "P", "11/2/1991", 4765000, "1 C")
YAYA.Rows.Add("36109065", "YULIANI A.", "P", "21/1/1992", 6216000, "1 C")
YAYA.Rows.Add("36109066", "HIJRAH KHERANA", "P", "18/7/1990", 5425000, "1 C")
YAYA.Rows.Add("36109067", "MEDO VALENTINE FEBRIANI I L", "P", "16/2/1992", 4451000, "1 C")
YAYA.Rows.Add("36109068", "HASNIATY MATARRU", "P", "21/5/1991", 1029000, "1 C")
YAYA.Rows.Add("36109069", "DANANG PRAYUDHA DWI E", "L", "6/7/1991", 2492000, "1 C")
YAYA.Rows.Add("36109070", "GUNAWAN MUSTARI", "L", "15/9/1991", 5692000, "1 C")
YAYA.Rows.Add("36109071", "TRIO WIJAYA PUTRA Y", "L", "8/8/1991", 3889000, "1 C")
YAYA.Rows.Add("36109072", "OKTAVIANI REGINA OGELANG", "P", "5/10/1991", 4075000, "1 C")
YAYA.Rows.Add("36109073", "EVIANTY KRISTINA LAYUCK", "P", "10/5/1991", 2549000, "1 C")
YAYA.Rows.Add("36109074", "KRISNAWATI SAMAN", "P", "6/9/1991", 2692000, "1 C")
YAYA.Rows.Add("36109075", "PUTRY ALFATIHAH", "P", "19/11/1991", 1847000, "1 C")
YAYA.Rows.Add("36109076", "A A GEDE DALEM P PUTRA", "L", "12/12/1991", 1109000, "1 C")
YAYA.Rows.Add("36109077", "MUHAMMAD NUR", "L", "9/4/1990", 2133000, "1 C")
YAYA.Rows.Add("36109078", "NURUDZDZAKIYYAH F", "P", "23/4/1992", 5900000, "1 C")
YAYA.Rows.Add("36109079", "CATHERINE PARUBAK", "P", "25/5/1991", 2115000, "1 C")
YAYA.Rows.Add("36109080", "JUMADI", "L", "14/10/1989", 2185000, "1 C")
YAYA.Rows.Add("36109081", "YUSRIANTO SAMBARA", "L", "16/1/1991", 3120000, "1 C")
YAYA.Rows.Add("36109082", "ADHE RHEZA SAHRUL ZAIN", "L", "11/10/1990", 1770000, "1 C")
YAYA.Rows.Add("36109083", "CHAIRUL ICHSAN", "L", "23/11/1991", 2501000, "1 C")
YAYA.Rows.Add("36109084", "FITRAH ADITYA HANAPI", "L", "11/4/1991", 5381000, "1 C")
'MENGATUR DATATABLE YG AKAN DIVIEW OLEH DATAVIEW
DV = YAYA.DefaultView
'UNTUK MENAMPILKAN DLM DATAGRIDVIEW
DataGridView1.DataSource = DV
End Sub
' untuk memsortir data untk semua radio button
Private Sub Stb_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stb.CheckedChanged
If stb.Checked = True Then
DV.Sort = "Stambuk"
End If
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
DV.Sort = "kelas desc"
End If
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
DV.Sort = "kelas,tanggalLahir"
End If
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
If RadioButton3.Checked = True Then
DV.Sort = "GajiOrtu desc"
End If
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
DV.RowFilter = "[Gaji Ortu]>=" & Val(TextBox1.Text)
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
DV.RowFilter = "Kelas <> '" & TextBox2.Text & "'"
End Sub
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
DV.RowFilter = "[Tanggal Lahir] < #" & DateTimePicker1.Value.Date & "#"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
End Class
Kamis, 13 Oktober 2011
Selasa, 11 Oktober 2011
Apkom 4 Latihan 13
Script ini punya Zani anak cantiknya akuntansi 08 kelas A D3
Public Class Latihan013012
' TEMPAT DEKLARASI UNTUK DATA TABEL BARU
Dim DTRI As New DataTable
Dim DTRS As New DataTable
Dim DTRSS As New DataTable
'DEKLARASI MEMBUAT DATASET BARU
Dim ZAHRAH As New DataSet 'yaitu object yg dpt menampung object datatable
'untuk mendeklarasikan binding source
Dim herawati As New BindingSource
Dim LUKMAN As New BindingSource
Dim AKBAR As New BindingSource
Private Sub Latihan_013_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'MEMBUAT TIGA BUAH TABEL dengannama kolom yg berbeda2
DTRI.Columns.Add(New DataColumn("Kode Rekening Induk", GetType(String))) 'untuk teks
DTRI.Columns.Add(New DataColumn("Nama Rekening Induk", GetType(String)))
DTRS.Columns.Add(New DataColumn("Kode Rekening Induk", GetType(String)))
DTRS.Columns.Add(New DataColumn("Kode Rekening Sub", GetType(String)))
DTRS.Columns.Add(New DataColumn("Nama Rekening Sub", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Kode Rekening Induk", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Kode Rekening sub", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Kode Rekening Sub-sub", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Nama Rekening Sub-sub", GetType(String)))
Dim Acak As New Random
For RI As Integer = 1 To Acak.Next(1, 5)
DTRI.Rows.Add(RI, "Nama Rekening " & RI)
For RS As Integer = 1 To Acak.Next(1, 5)
DTRS.Rows.Add(RI, RI & RS, "Nama Sub Rekening " & RI & RS)
For RSS As Integer = 1 To Acak.Next(1, 5)
DTRSS.Rows.Add(RI, RI & RS, RI & RS & RSS, "Nama Sub Sub Rekening " & RI & RS & RSS)
Next
Next
Next
'MEMASUKKAN DATATABEL KE DATA SET DAN JIKA SDH D DLM DATASET NAMA DTTABEL SHD TDK DIKENAL LG
ZAHRAH.Tables.Add(DTRI)
ZAHRAH.Tables.Add(DTRS)
ZAHRAH.Tables.Add(DTRSS)
'UNTUK MENGGANTI NAMA DLM DATASET YG TDX TABEL1 DST (BS DILAKUKAN SEBELUM DTTABEL DMASUKKAN KE DLM DATASET)
DTRI.TableName = "ICA"
DTRS.TableName = "DIS"
DTRSS.TableName = "OCA"
'UNTUK MENAMBAH RELASI DLM DATASET dari ica ke dis dan dis ke oca
ZAHRAH.Relations.Add(New DataRelation("TA", ZAHRAH.Tables("ICA").Columns("kode rekening induk"), ZAHRAH.Tables("dis").Columns("kode rekening induk")))
ZAHRAH.Relations.Add(New DataRelation("HI", ZAHRAH.Tables("DIS").Columns("kode rekening sub"), ZAHRAH.Tables("oca").Columns("kode rekening sub")))
'membuat binding datasource (mengatur datasource dan data membernya)
herawati.DataSource = ZAHRAH
herawati.DataMember = "ica"
'DATASOURCE BINDING2 ADLH NAMA BINDING YG P'TAMA DAN DATAMEMBERNYA ADLAH NAMA RELASINYA
LUKMAN.DataSource = herawati
LUKMAN.DataMember = "TA"
'DATASOURCE BINDINg3 ADLH NAMA BINDING YG kedua DAN DATAMEMBERNYA ADLAH NAMA RELASINYA
AKBAR.DataSource = LUKMAN
AKBAR.DataMember = "HI"
'MEMUNCULKAN DLM DGV
DataGridView1.DataSource = herawati
DataGridView2.DataSource = LUKMAN
DataGridView3.DataSource = AKBAR
End Sub
End Class
Public Class Latihan013012
' TEMPAT DEKLARASI UNTUK DATA TABEL BARU
Dim DTRI As New DataTable
Dim DTRS As New DataTable
Dim DTRSS As New DataTable
'DEKLARASI MEMBUAT DATASET BARU
Dim ZAHRAH As New DataSet 'yaitu object yg dpt menampung object datatable
'untuk mendeklarasikan binding source
Dim herawati As New BindingSource
Dim LUKMAN As New BindingSource
Dim AKBAR As New BindingSource
Private Sub Latihan_013_012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'MEMBUAT TIGA BUAH TABEL dengannama kolom yg berbeda2
DTRI.Columns.Add(New DataColumn("Kode Rekening Induk", GetType(String))) 'untuk teks
DTRI.Columns.Add(New DataColumn("Nama Rekening Induk", GetType(String)))
DTRS.Columns.Add(New DataColumn("Kode Rekening Induk", GetType(String)))
DTRS.Columns.Add(New DataColumn("Kode Rekening Sub", GetType(String)))
DTRS.Columns.Add(New DataColumn("Nama Rekening Sub", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Kode Rekening Induk", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Kode Rekening sub", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Kode Rekening Sub-sub", GetType(String)))
DTRSS.Columns.Add(New DataColumn("Nama Rekening Sub-sub", GetType(String)))
Dim Acak As New Random
For RI As Integer = 1 To Acak.Next(1, 5)
DTRI.Rows.Add(RI, "Nama Rekening " & RI)
For RS As Integer = 1 To Acak.Next(1, 5)
DTRS.Rows.Add(RI, RI & RS, "Nama Sub Rekening " & RI & RS)
For RSS As Integer = 1 To Acak.Next(1, 5)
DTRSS.Rows.Add(RI, RI & RS, RI & RS & RSS, "Nama Sub Sub Rekening " & RI & RS & RSS)
Next
Next
Next
'MEMASUKKAN DATATABEL KE DATA SET DAN JIKA SDH D DLM DATASET NAMA DTTABEL SHD TDK DIKENAL LG
ZAHRAH.Tables.Add(DTRI)
ZAHRAH.Tables.Add(DTRS)
ZAHRAH.Tables.Add(DTRSS)
'UNTUK MENGGANTI NAMA DLM DATASET YG TDX TABEL1 DST (BS DILAKUKAN SEBELUM DTTABEL DMASUKKAN KE DLM DATASET)
DTRI.TableName = "ICA"
DTRS.TableName = "DIS"
DTRSS.TableName = "OCA"
'UNTUK MENAMBAH RELASI DLM DATASET dari ica ke dis dan dis ke oca
ZAHRAH.Relations.Add(New DataRelation("TA", ZAHRAH.Tables("ICA").Columns("kode rekening induk"), ZAHRAH.Tables("dis").Columns("kode rekening induk")))
ZAHRAH.Relations.Add(New DataRelation("HI", ZAHRAH.Tables("DIS").Columns("kode rekening sub"), ZAHRAH.Tables("oca").Columns("kode rekening sub")))
'membuat binding datasource (mengatur datasource dan data membernya)
herawati.DataSource = ZAHRAH
herawati.DataMember = "ica"
'DATASOURCE BINDING2 ADLH NAMA BINDING YG P'TAMA DAN DATAMEMBERNYA ADLAH NAMA RELASINYA
LUKMAN.DataSource = herawati
LUKMAN.DataMember = "TA"
'DATASOURCE BINDINg3 ADLH NAMA BINDING YG kedua DAN DATAMEMBERNYA ADLAH NAMA RELASINYA
AKBAR.DataSource = LUKMAN
AKBAR.DataMember = "HI"
'MEMUNCULKAN DLM DGV
DataGridView1.DataSource = herawati
DataGridView2.DataSource = LUKMAN
DataGridView3.DataSource = AKBAR
End Sub
End Class
Kamis, 06 Oktober 2011
Latihan 12 Apkom 4
Form Latihan 12 ==> Semoga bisa membantu anda (created by sani)
'BAGIAN DEKLARASI
Dim DTNISA As New DataTable
Private Sub Latihan012012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'saat di debug muncul colom2 yg dibuat
DTNISA.Columns.Add(New DataColumn("NO PEMBELIAN", GetType(String))) 'untuk teks
DTNISA.Columns.Add(New DataColumn("TGL PEMBELIAN", GetType(Date))) 'untuk tgl
DTNISA.Columns.Add(New DataColumn("NAMA BARANG", GetType(String)))
DTNISA.Columns.Add(New DataColumn("HARGA/UNIT", GetType(Double))) 'untuk angka
DTNISA.Columns.Add(New DataColumn("UNIT", GetType(Integer))) 'untuk angka
DTNISA.Columns.Add(New DataColumn("JUMLAH", GetType(Double)))
DataGridView1.DataSource = DTNISA
'datagridwiew digunakan untuk menampilkan tabel yg sdh dibuat jika tdk maka tabel tdk akn muncul
'rumus dibwh ini untuk membuat primary key dimana dcp adalah nama sembarangji
Dim dcp(1) As DataColumn
dcp(0) = DTNISA.Columns("NO PEMBELIAN")
DTNISA.PrimaryKey = dcp
End Sub
Private Sub hu_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hu.TextChanged, u.TextChanged
'MENGHITUNG TEXTBOX JUMLAH
j.Text = Val(hu.Text) * Val(u.Text)
End Sub
Private Sub simpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan.Click
'UNTUK MENYMPAN DATA YG DIMASUKKAN KE DALAM DATAGRIDVIEW
Dim drzany As DataRow
drzany = DTNISA.Rows.Find(nopem.Text) 'untuk mencari apakah ada no.pembelian sdh ada agar tdak double
If drzany Is Nothing Then 'jika tidak ad ji maka lanjutkan penyimpanan
drzany = DTNISA.NewRow ' menambah baris
drzany("NO PEMBELIAN") = nopem.Text
drzany("TGL PEMBELIAN") = dtp.Text
drzany("NAMA BARANG") = nb.Text
drzany("HARGA/UNIT") = Val(hu.Text)
drzany("UNIT") = Val(u.Text)
drzany("JUMLAH") = Val(j.Text)
DTNISA.Rows.Add(drzany)
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
Else
MsgBox("nomor sudah ada")
End If
ZANZAN()
End Sub
Private Sub t1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t1.Click
Dim drzany As DataRow
If Val(TextBox8.Text) <= DTNISA.Rows.Count Then ' jika databaris yg diminta lebih kecil dari jumlh baris maka
drzany = DTNISA.Rows(Val(TextBox8.Text) - 1)
nopem.Text = drzany("NO PEMBELIAN")
dtp.Text = drzany("TGL PEMBELIAN")
nb.Text = drzany("NAMA BARANG")
hu.Text = drzany("HARGA/UNIT")
u.Text = drzany("UNIT")
j.Text = drzany("JUMLAH")
Else
MsgBox("nomor tidak terdaftar")
End If
TextBox8.Text = ""
End Sub
Private Sub h1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h1.Click
Dim drzany As DataRow
drzany = DTNISA.Rows(Val(TextBox8.Text) - 1)
If Val(TextBox8.Text) <= DTNISA.Rows.Count Then
drzany.Delete()
Else
MsgBox("data tidak terdaftar")
End If
TextBox8.Text = ""
ZANZAN()
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
End Sub
Private Sub t2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t2.Click
' jika b'dasrkan nopem maka dicari dulu dlm datagridview datanya
Dim drzany As DataRow
drzany = DTNISA.Rows.Find(TextBox9.Text)
If Not drzany Is Nothing Then ' jika ada
nopem.Text = drzany("NO PEMBELIAN")
dtp.Text = drzany("TGL PEMBELIAN")
nb.Text = drzany("NAMA BARANG")
hu.Text = drzany("HARGA/UNIT")
u.Text = drzany("UNIT")
j.Text = drzany("JUMLAH")
Else
MsgBox("nomor tidak terdaftar")
End If
TextBox9.Text = ""
End Sub
Private Sub h2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h2.Click
Dim drzany As DataRow
drzany = DTNISA.Rows.Find(TextBox9.Text) 'untuk menghapus jg dicari dlu datanya dlm data gridview
If Not drzany Is Nothing Then ' artinya jika ada
drzany.Delete()
Else
MsgBox("nomor tidak terdaftar")
End If
TextBox9.Text = ""
ZANZAN()
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
End Sub
Private Sub t3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t3.Click
Dim drzany As DataRow
drzany = DTNISA.DefaultView(BindingContext(DTNISA).Position).Row
nopem.Text = drzany("NO PEMBELIAN")
dtp.Value = drzany("TGL PEMBELIAN")
nb.Text = drzany("NAMA BARANG")
hu.Text = drzany("HARGA/UNIT")
u.Text = drzany("UNIT")
j.Text = drzany("JUMLAH")
End Sub
Private Sub h3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h3.Click
Dim drzany As DataRow
drzany = DTNISA.DefaultView(BindingContext(DTNISA).Position).Row
drzany.Delete()
ZANZAN()
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
End Sub
Private Sub ZANZAN()
Dim CANTIK As Integer
Dim manis As Integer
For Each r As DataRow In DTNISA.Rows
CANTIK = CANTIK + r("UNIT")
manis = manis + r("JUMLAH")
Next
TU.Text = CANTIK
TOT.Text = manis
End Sub
'BAGIAN DEKLARASI
Dim DTNISA As New DataTable
Private Sub Latihan012012_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'saat di debug muncul colom2 yg dibuat
DTNISA.Columns.Add(New DataColumn("NO PEMBELIAN", GetType(String))) 'untuk teks
DTNISA.Columns.Add(New DataColumn("TGL PEMBELIAN", GetType(Date))) 'untuk tgl
DTNISA.Columns.Add(New DataColumn("NAMA BARANG", GetType(String)))
DTNISA.Columns.Add(New DataColumn("HARGA/UNIT", GetType(Double))) 'untuk angka
DTNISA.Columns.Add(New DataColumn("UNIT", GetType(Integer))) 'untuk angka
DTNISA.Columns.Add(New DataColumn("JUMLAH", GetType(Double)))
DataGridView1.DataSource = DTNISA
'datagridwiew digunakan untuk menampilkan tabel yg sdh dibuat jika tdk maka tabel tdk akn muncul
'rumus dibwh ini untuk membuat primary key dimana dcp adalah nama sembarangji
Dim dcp(1) As DataColumn
dcp(0) = DTNISA.Columns("NO PEMBELIAN")
DTNISA.PrimaryKey = dcp
End Sub
Private Sub hu_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hu.TextChanged, u.TextChanged
'MENGHITUNG TEXTBOX JUMLAH
j.Text = Val(hu.Text) * Val(u.Text)
End Sub
Private Sub simpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpan.Click
'UNTUK MENYMPAN DATA YG DIMASUKKAN KE DALAM DATAGRIDVIEW
Dim drzany As DataRow
drzany = DTNISA.Rows.Find(nopem.Text) 'untuk mencari apakah ada no.pembelian sdh ada agar tdak double
If drzany Is Nothing Then 'jika tidak ad ji maka lanjutkan penyimpanan
drzany = DTNISA.NewRow ' menambah baris
drzany("NO PEMBELIAN") = nopem.Text
drzany("TGL PEMBELIAN") = dtp.Text
drzany("NAMA BARANG") = nb.Text
drzany("HARGA/UNIT") = Val(hu.Text)
drzany("UNIT") = Val(u.Text)
drzany("JUMLAH") = Val(j.Text)
DTNISA.Rows.Add(drzany)
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
Else
MsgBox("nomor sudah ada")
End If
ZANZAN()
End Sub
Private Sub t1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t1.Click
Dim drzany As DataRow
If Val(TextBox8.Text) <= DTNISA.Rows.Count Then ' jika databaris yg diminta lebih kecil dari jumlh baris maka
drzany = DTNISA.Rows(Val(TextBox8.Text) - 1)
nopem.Text = drzany("NO PEMBELIAN")
dtp.Text = drzany("TGL PEMBELIAN")
nb.Text = drzany("NAMA BARANG")
hu.Text = drzany("HARGA/UNIT")
u.Text = drzany("UNIT")
j.Text = drzany("JUMLAH")
Else
MsgBox("nomor tidak terdaftar")
End If
TextBox8.Text = ""
End Sub
Private Sub h1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h1.Click
Dim drzany As DataRow
drzany = DTNISA.Rows(Val(TextBox8.Text) - 1)
If Val(TextBox8.Text) <= DTNISA.Rows.Count Then
drzany.Delete()
Else
MsgBox("data tidak terdaftar")
End If
TextBox8.Text = ""
ZANZAN()
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
End Sub
Private Sub t2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t2.Click
' jika b'dasrkan nopem maka dicari dulu dlm datagridview datanya
Dim drzany As DataRow
drzany = DTNISA.Rows.Find(TextBox9.Text)
If Not drzany Is Nothing Then ' jika ada
nopem.Text = drzany("NO PEMBELIAN")
dtp.Text = drzany("TGL PEMBELIAN")
nb.Text = drzany("NAMA BARANG")
hu.Text = drzany("HARGA/UNIT")
u.Text = drzany("UNIT")
j.Text = drzany("JUMLAH")
Else
MsgBox("nomor tidak terdaftar")
End If
TextBox9.Text = ""
End Sub
Private Sub h2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h2.Click
Dim drzany As DataRow
drzany = DTNISA.Rows.Find(TextBox9.Text) 'untuk menghapus jg dicari dlu datanya dlm data gridview
If Not drzany Is Nothing Then ' artinya jika ada
drzany.Delete()
Else
MsgBox("nomor tidak terdaftar")
End If
TextBox9.Text = ""
ZANZAN()
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
End Sub
Private Sub t3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles t3.Click
Dim drzany As DataRow
drzany = DTNISA.DefaultView(BindingContext(DTNISA).Position).Row
nopem.Text = drzany("NO PEMBELIAN")
dtp.Value = drzany("TGL PEMBELIAN")
nb.Text = drzany("NAMA BARANG")
hu.Text = drzany("HARGA/UNIT")
u.Text = drzany("UNIT")
j.Text = drzany("JUMLAH")
End Sub
Private Sub h3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles h3.Click
Dim drzany As DataRow
drzany = DTNISA.DefaultView(BindingContext(DTNISA).Position).Row
drzany.Delete()
ZANZAN()
nopem.Text = ""
nb.Text = ""
hu.Text = ""
u.Text = ""
j.Text = ""
End Sub
Private Sub ZANZAN()
Dim CANTIK As Integer
Dim manis As Integer
For Each r As DataRow In DTNISA.Rows
CANTIK = CANTIK + r("UNIT")
manis = manis + r("JUMLAH")
Next
TU.Text = CANTIK
TOT.Text = manis
End Sub
Langganan:
Postingan (Atom)