Tugas Kelompok 2
Tugas Kelompok 2
Disusun oleh
2. Kemudian cari menu Add New Item dan pilih Add New Item atau tekan ctrl+shift+A kemudian
akan muncul seperti gambar di bawah dan plih Local Database pilih Add kemudian tekan Next
dan finisht
3. Kemudian buka server explore, klik kanan di “data connection” dan pilih add new connection.
4. Pilih Change di data sources dan pilih “Microsoft SQL Server Database File (SqlClient)” da
nisi database file name dengan nama yang kita inginkan dan klik ok.
5. Kemudian klik dua kali database yang sudah kita buat, dan pada table klik kanan dan pilih
create table, kemudian akan muncul seperti gambar dibawah.
6. Kemudian buatlah table seperti contoh dibawah.
7. Kemudian pilih menu view, pilih other window dan pilih Data Sources pilih Add New Data
Source dan akan muncul seperti gambar di bawah, kemudian pilih Dataset klik Next
8. Kemudian pilih dataset dan klik next kemudian pilih database yang telah dibuat seperti
gambar dibawah.
9. Kemudian akan muncul seperti gambar dibawah, centang Table dan Klik Finish
10. Kemudian buka form VB dan “data sources”
11. Kemudian masukan data table pada form dengan cara klik tahan (drag) dari “data sources”
ke form VB, seperti gambar dibawah ini
1. Install program yang telah di publish dengan cara klik setup dan klik install
2. Kemudian pilih alat yang akan di hitung produktivitasnya misalnya Bulldozer dan klik
mulai.
3. Sebelum memasukan data kliklah tanda + yang dilingkar merah
4. Isi data seperti contoh dibawah dan klik simpan dan pilih keluar untuk kembali ke menu
utama
LAMPIRAN
Koding Program
Koding Form1
End If
End Sub
End Sub
End Class
Koding Form2
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
End Sub
Sub kosong()
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox4.Text = "0"
Me.TextBox5.Text = ""
End Sub
Private Sub button3_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
kosong()
End Sub
Private Sub button4_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
ElseIf TextBox2.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
ElseIf TextBox3.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
End If
TextBox4.Text = Val(Val(TextBox1.Text) * 60 * Val(TextBox2.Text) /
Val(TextBox3.Text))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
BindingNavigatorAddNewItem.PerformClick()
End Sub
End If
End Sub
End Sub
End Class
Koding Form3
Public Class form3
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
End Sub
Sub kosong()
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox4.Text = "0"
Me.TextBox5.Text = ""
Me.TextBox5.Focus()
End Sub
Private Sub button3_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
kosong()
End Sub
Private Sub button4_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
ElseIf TextBox2.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
ElseIf TextBox3.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
End If
TextBox4.Text = Val(Val(TextBox1.Text) * 60 * Val(TextBox2.Text) /
Val(TextBox3.Text))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
BindingNavigatorAddNewItem.PerformClick()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = "KOMATSU PC4000 SHOVEL" Then
TextBox1.Text = 22 And
ComboBox1.Text = "KOMATSU PC4000 SHOVEL"
PictureBox1.Show()
PictureBox2.Hide()
PictureBox3.Hide()
ElseIf ComboBox1.Text = "KOMATSU PC8000 SHOVEL" Then
TextBox1.Text = 38 And
ComboBox1.Text = "KOMATSU PC8000 SHOVEL"
PictureBox1.Hide()
PictureBox2.Show()
PictureBox3.Hide()
ElseIf ComboBox1.Text = "KOMATSU PC3000 SHOVEL" Then
TextBox1.Text = 15 And
ComboBox1.Text = "KOMATSU PC3000 SHOVEL"
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Show()
ElseIf ComboBox1.Text = "Lainnya" Then
TextBox1.Clear()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
MsgBox("Kb Tulis Sendiri", MsgBoxStyle.Information, "Perhatian")
End If
End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs)
TextBox4.Text = FormatNumber(TextBox4.Text, 3)
End Sub
End Sub
End Class
Koding Form4
Public Class form4
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
End Sub
Sub kosong()
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox4.Text = "0"
Me.TextBox5.Text = ""
Me.TextBox5.Focus()
End Sub
Private Sub button3_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button3.Click
kosong()
End Sub
Private Sub button4_click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
ElseIf TextBox2.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
ElseIf TextBox3.Text = "" Then
MsgBox("Semua Data Harus Diisi", MsgBoxStyle.Information, "Perhatian")
End If
TextBox4.Text = Val(Val(TextBox1.Text) * 60 * Val(TextBox2.Text) /
Val(TextBox3.Text))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
BindingNavigatorAddNewItem.PerformClick()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = "KOMATSU PC220LC-6 EXCEL HYDRAULIC EXCAVATOR" Then
TextBox1.Text = 1.3 And
ComboBox1.Text = "KOMATSU PC220LC-6 EXCEL HYDRAULIC EXCAVATOR"
PictureBox1.Show()
PictureBox2.Hide()
PictureBox3.Hide()
ElseIf ComboBox1.Text = "KOMATSU PC250LC-6 HYDRAULIC EXCAVATOR" Then
TextBox1.Text = 1.5 And
ComboBox1.Text = "KOMATSU PC250LC-6 HYDRAULIC EXCAVATOR"
PictureBox1.Hide()
PictureBox2.Show()
PictureBox3.Hide()
ElseIf ComboBox1.Text = "KOMATSU PC600 QUARRY-6 HYDRAULIC EXCAVATOR" Then
TextBox1.Text = 2.7 And
ComboBox1.Text = "KOMATSU PC600 QUARRY-6 HYDRAULIC EXCAVATOR"
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Show()
ElseIf ComboBox1.Text = "Lainnya" Then
TextBox1.Clear()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
MsgBox("Kb Tulis Sendiri", MsgBoxStyle.Information, "Perhatian")
End If
End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs)
TextBox4.Text = FormatNumber(TextBox4.Text, 3)
End Sub
End Sub
End Class
Koding Form5
Public Class form5
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
End Sub
Sub kosong()
Me.TextBox1.Text = ""
Me.TextBox2.Text = ""
Me.TextBox3.Text = ""
Me.TextBox4.Text = "0"
Me.TextBox5.Text = ""
Me.TextBox5.Focus()
End Sub
End Sub
End Sub
End Sub
End Class