‘berpindah dan tampilkan Imports System.Data Imports System.Data.

SqlClient Public Class Form1 Dim con As SqlConnection Dim da As SqlDataAdapter Dim ds As DataSet Dim dr As DataRow Dim i As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con = New SqlConnection("data source = localhost; initial catalog = northwind; integrated security = true") da = New SqlDataAdapter("select *from customers", con) ds = New DataSet da.Fill(ds, "customers") i=0 Call tampil() End Sub Sub tampil() dr = ds.Tables("customers").Rows(i) txtid.Text = dr("customerid") txtcompany.Text = dr("companyname") txtcontact.Text = dr("contactname") txtadd.Text = dr("address") txtcity.Text = dr("city") txtphone.Text = dr("phone") If i = 0 Then Button2.Enabled = False Else Button2.Enabled = True End If If i = dr.Table.Rows.Count - 1 Then Button3.Enabled = False Else Button3.Enabled = True End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click i -= 1 Call tampil() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click i += 1 Call tampil() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click i = ds.Tables("customers").Rows.Count - 1 Call tampil() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click i=0 Call tampil() End Sub End Class

con) ds = New DataSet da.1 Then Button3.Tables("employees").Load con = New SqlConnection("data source = localhost.Text = dr("firstname") txttitle.Object.Click i -= 1 Call tampil() End Sub Private Sub Button3_Click(ByVal sender As System.1 Call tampil() End Sub End Class . ByVal e As System.Enabled = True End If If i = dr. ByVal e As System.Enabled = False Else Button2.Rows. initial catalog = northwind.Text = dr("address") txtcity.Click i = ds.Click i += 1 Call tampil() End Sub Private Sub Button4_Click(ByVal sender As System.Count .Click i=0 Call tampil() End Sub Private Sub Button2_Click(ByVal sender As System. ByVal e As System.Text = dr("birthdate") txthire.EventArgs) Handles Button2.Data Imports System.Rows.Fill(ds. ByVal e As System.Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.Rows(i) txtid.Data.SqlClient Public Class Form2 Dim con As SqlConnection Dim da As SqlDataAdapter Dim ds As DataSet Dim dr As DataRow Dim i As Integer Private Sub Form2_Load(ByVal sender As System.Tables("employees").Text = dr("titleofcourtesy") txtbirth.Object.‘form 2 berpindah Imports System.Text = dr("city") If i = 0 Then Button2.Object.EventArgs) Handles Button4.Count .Enabled = False Else Button3.EventArgs) Handles MyBase.Object.Object.EventArgs) Handles Button3.EventArgs) Handles Button1. integrated security = true") da = New SqlDataAdapter("select *from employees".Text = dr("employeeid") txtlast.Table.Text = dr("title") txtTOC. "employees") i=0 Call tampil() End Sub Sub tampil() dr = ds.Text = dr("hiredate") txtadd. ByVal e As System.Text = dr("lastname") txtfirst.

TextBox1.Add(i & vbTab & TextBox1.EventArgs) Handles Button1.Items.Text = "" TextBox2.txt") While Not sr.Close() Dim sr As StreamReader sr = File.Focus() End Sub Private Sub Button2_Click(ByVal sender As System.ListBox1. ByVal e As System.Text & vbTab & TextBox2.Text) End With sw.Object.AppendText("msh.Add(sr. ByVal e As System.modul1form1 Imports System.EndOfStream ListBox1.OpenText("msh.Close() End Sub End Class .Text = "" Me.Text & vbTab & TextBox2.ReadLine) End While sr.Click Dim sw As StreamWriter i += 1 sw = File.IO Public Class Form1 '082111428 kelvin Dim i As Byte Private Sub Button1_Click(ByVal sender As System.Click 'Me.EventArgs) Handles Button2.Object.txt") With sw .Items.Text) TextBox1.WriteLine(i & vbTab & TextBox1.Close() 'i += 1 'Me.

ByVal e As System.EndOfStream lsttampil.Click Dim sw As StreamWriter sw = File.OpenText("pionner. ByVal e As System.Close() End Sub End Class .EventArgs) Handles Button1.Click Dim sr As StreamReader sr = File.Object.WriteLine("3") End With sw.WriteLine("2") .txt") With sw .modul1form2 Imports System.Show("Data Telah Disimpan") End Sub Private Sub Button2_Click(ByVal sender As System.Add(sr.WriteLine("1") .txt") While Not sr.Close() MessageBox.ReadLine) End While sr.Items.CreateText("pionner.Object.EventArgs) Handles Button2.IO Public Class Form2 Private Sub Button1_Click(ByVal sender As System.

Text = "" Me.Click Dim sw As StreamWriter sw = File.Object.TextBox3.WriteLine(TextBox1.ReadLine) End While sr.EndOfStream ListBox1.WriteLine("PC" & vbTab & "Masuk" & vbTab & "Keluar" & vbTab & "Lama" & vbTab & "Tagihan") End With sw.Text = "" Me.Focus() Else .Text = "" Me.EventArgs) Handles Button2.Object.Text & TextBox3.Text & vbTab & TextBox2.Text = "" Me.EventArgs) Handles Button1.AppendText("warnet.Add("PC" & vbTab & "Masuk" & vbTab & "Keluar" & vbTab & "Lama" & vbTab & "Tagihan") While Not sr.Show("waktu masuk harus lebih kecil dari waktu keluar") Me.CInt(TextBox2.TextBox2. ByVal e As System.TextBox2.Focus() Else lama = CInt(TextBox3.Text = "" Me. ongkos As Integer If Not IsNumeric(TextBox2. ByVal e As System.Close() End Sub End Class .TextBox1.Items.Click Dim sr As StreamReader sr = File.txt") With sw Dim lama.TextBox2.Items.TextBox1.Text) .Add(sr.OpenText("warnet.Text = "" Me.TextBox2.IO Public Class Form3 Private Sub Button1_Click(ByVal sender As System.txt") ListBox1.Text = "" Me.modul1form3 Imports System.Show("waktu masuk dan waktu keluar harus berupa angka") Me.TextBox3.Text) ongkos = lama * 3000 If lama < 0 Then MessageBox.TextBox3.Focus() End If End If '.Close() End Sub Private Sub Button2_Click(ByVal sender As System.TextBox2.Text & vbTab & lama & vbTab & ongkos) Me.Text & vbTab & TextBox3.Text) Then MessageBox.

Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.EventArgs) Handles MyBase. ByVal e As System.Click i += 1 Call tampil() End Sub Private Sub Button4_Click(ByVal sender As System.Load con = New SqlConnection("data source = localhost.Click i=0 Call tampil() End Sub Private Sub Button2_Click(ByVal sender As System. ByVal e As System.tugas server praktekvb2 form1 Imports System.EventArgs) Handles Button2.1 Call tampil() End Sub Private Sub txtjk_TextChanged(ByVal sender As System.EventArgs) Handles txtjk.Data.EventArgs) Handles Button4.Object.Count .TextChanged .Object. tgl As String dr = ds.Count .1 Then Button3.Object.Text = dr("nim") txtnama.Tables("tbl_mahasiswa").Text = dr("wk") If i = 0 Then Button2.Rows.Table.Click i -= 1 Call tampil() End Sub Private Sub Button3_Click(ByVal sender As System.Object.Click i = ds.SqlClient Public Class Form1 Dim con As SqlConnection Dim da As SqlDataAdapter Dim ds As DataSet Dim dr As DataRow Dim i As Integer Private Sub Form1_Load(ByVal sender As System.Object. initial catalog = praktekvb2. ByVal e As System.EventArgs) Handles Button1. ByVal e As System.Rows(i) tpt = dr("tempat") tgl = dr("tanggal") txtnim.Enabled = True End If If i = dr. "tbl_mahasiswa") i=0 Call tampil() End Sub Sub tampil() Dim tpt.Tables("tbl_mahasiswa"). con) ds = New DataSet da.EventArgs) Handles Button3.Text = dr("jk") txtwk. integrated security = true") da = New SqlDataAdapter("select *from tbl_mahasiswa"." & tgl txtjk.Data Imports System. ByVal e As System.Rows.Enabled = False Else Button2. ByVal e As System.Text = dr("nama") txtttl.Text = tpt & ".Enabled = False Else Button3.Fill(ds.Object.

Text = "pria" ElseIf txtjk.TextChanged If txtwk.Text = "2" Then txtjk.Text = "1" Then txtwk.Text = "1" Then txtjk.Text = "malam" End If End Sub End Class .Object.If txtjk. ByVal e As System.Text = "pagi" ElseIf txtwk.Text = "wanita" End If End Sub Private Sub txtwk_TextChanged(ByVal sender As System.EventArgs) Handles txtwk.Text = "2" Then txtwk.

ByVal e As System.Object.EventArgs) Handles Button4.SqlClient Public Class Form2 Dim con As SqlConnection Dim da As SqlDataAdapter Dim ds As DataSet Dim dr As DataRow Dim i As Integer Private Sub Form2_Load(ByVal sender As System. ByVal e As System.Enabled = True End If If i = dr.Object.Enabled = False Else Button2.Object.EventArgs) Handles Button3.Count .EventArgs) Handles Button1.Click i += 1 Call tampil() End Sub Private Sub Button4_Click(ByVal sender As System.1 Then Button3.Enabled = False Else Button3.Rows. ByVal e As System.Text = dr("kode_jk") txtket.EventArgs) Handles Button2.Click i -= 1 Call tampil() End Sub Private Sub Button3_Click(ByVal sender As System.Tables("tbl_jk").Text = dr("keterangan") If i = 0 Then Button2.Count . con) ds = New DataSet da.Rows. integrated security = true") da = New SqlDataAdapter("select *from tbl_jk".Rows(i) txtjk.tugas server praktekvb2 form2 Imports System.Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.Object. ByVal e As System. ByVal e As System.1 Call tampil() End Sub End Class .Table. "tbl_jk") i=0 Call tampil() End Sub Sub tampil() dr = ds.Tables("tbl_jk").Click i = ds.EventArgs) Handles MyBase.Data Imports System.Fill(ds.Object. initial catalog = praktekvb2.Data.Click i=0 Call tampil() End Sub Private Sub Button2_Click(ByVal sender As System.Load con = New SqlConnection("data source = localhost.

integrated security = true") da = New SqlDataAdapter("select *from tbl_wk".1 Then Button3.Rows.Enabled = False Else Button3.Rows(i) txtwk.Object.Enabled = False Else Button2.Click i = ds.EventArgs) Handles Button3.Tables("tbl_wk"). con) ds = New DataSet da.Click i=0 Call tampil() End Sub Private Sub Button2_Click(ByVal sender As System.EventArgs) Handles Button1.Click i -= 1 Call tampil() End Sub Private Sub Button3_Click(ByVal sender As System. "tbl_wk") i=0 Call tampil() End Sub Sub tampil() dr = ds.1 Call tampil() End Sub End Class .Text = dr("keterangan") If i = 0 Then Button2.Fill(ds.Tables("tbl_wk").Click i += 1 Call tampil() End Sub Private Sub Button4_Click(ByVal sender As System. ByVal e As System.Data.Enabled = True End If If i = dr. ByVal e As System.tugas server praktekvb2 form3 Imports System. ByVal e As System.EventArgs) Handles Button4. ByVal e As System.Load con = New SqlConnection("data source = localhost. ByVal e As System.Object. initial catalog = praktekvb2.Object.EventArgs) Handles Button2.Text = dr("kode_wk") txtket.Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.EventArgs) Handles MyBase.Table.Count .Data Imports System.Object.Rows.Count .SqlClient Public Class Form3 Dim con As SqlConnection Dim da As SqlDataAdapter Dim ds As DataSet Dim dr As DataRow Dim i As Integer Private Sub Form3_Load(ByVal sender As System.Object.

Object.Text = dr("jenjang") If i = 0 Then Button2.SqlClient Public Class Form4 Dim con As SqlConnection Dim da As SqlDataAdapter Dim ds As DataSet Dim dr As DataRow Dim i As Integer Private Sub Form4_Load(ByVal sender As System.Count .Click i=0 Call tampil() End Sub Private Sub Button2_Click(ByVal sender As System.Table.Object. ByVal e As System.Enabled = True End If End Sub Private Sub Button1_Click(ByVal sender As System.Text = dr("kode_prodi") txtket.Load con = New SqlConnection("data source = localhost.Tables("tbl_prodi").tugas server praktekvb2 form 4 Imports System.Text = dr("keterangan") txtjenjang.Data Imports System. "tbl_prodi") i=0 Call tampil() End Sub Sub tampil() dr = ds.EventArgs) Handles MyBase. con) ds = New DataSet da.EventArgs) Handles Button1.Enabled = True End If If i = dr.Enabled = False Else Button3.Enabled = False Else Button2.Object.Fill(ds.Rows.Rows(i) txtkode. ByVal e As System.Click i -= 1 Call tampil() End Sub . initial catalog = praktekvb2. integrated security = true") da = New SqlDataAdapter("select *from tbl_prodi".EventArgs) Handles Button2.Data. ByVal e As System.1 Then Button3.

Click Me.Add(txtnama.Text) End With End If Dim sr As StreamReader sr = File.tugas1from1 Imports System.txt") With sw WriteLine(txtnama.ListBox1.EventArgs) Handles btnkosong.CreateText("data.Items.txt") ListBox1.Object.Click If cbxappend.Checked = True Then Dim sw As StreamWriter sw = File.Object.AppendText("data.IO Public Class Form1 Private Sub btntambah_Click(ByVal sender As System.txt") With sw WriteLine(txtnama. ByVal e As System.Text = "" End Sub End Class .Text) End Sub Private Sub btnkosong_Click(ByVal sender As System.OpenText("data.EventArgs) Handles btntambah. ByVal e As System.Text) End With Else Dim sw As StreamWriter sw = File.

Sign up to vote on this title
UsefulNot useful