Jumat, 12 Oktober 2012
APKOM: TUGAS KUMPUL-04 4611016
Public Class Form1
Private Sub tambah_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tambah.Click
If Nama.Text.Length = 0 Then
MsgBox("Nama masih kosong")
Exit Sub
End If
If Pegawai.FindStringExact(Nama.Text) > -1 Then
MsgBox("Nama tersebut telah terdaftar")
Exit Sub
End If
If Akademik.FindStringExact(Nama.Text) > -1 Then
MsgBox("Nama tersebut telah terdaftar di Akademik")
Exit Sub
End If
If keuangan.FindStringExact(Nama.Text) > -1 Then
MsgBox("Nama tersebut telah terdaftar di Keuangan")
Exit Sub
End If
Pegawai.Items.Add(Nama.Text)
Nama.Text = ""
End Sub
Private Sub pka1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pka1.Click
Akademik.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
If Pegawai.Items.Count = 0 Then
Exit Sub
End If
If Pegawai.SelectedItems.Count = 0 Then
MsgBox("Pilih pegawai yang akan dipindahkan")
Exit Sub
End If
Akademik.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
End Sub
Private Sub pkas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pkas.Click
Akademik.Items.AddRange(Pegawai.Items)
Pegawai.Items.Clear()
End Sub
Private Sub pka2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pka2.Click
Dim ItemPilihan As ListBox.SelectedObjectCollection
ItemPilihan = Pegawai.SelectedItems
For IndexItemPilihan As Integer = 0 To ItemPilihan.Count - 1
Akademik.Items.Add(ItemPilihan.Item(IndexItemPilihan))
Next
Dim IdPilihan As ListBox.SelectedIndexCollection
IdPilihan = Pegawai.SelectedIndices
For IdIdPilihan As Integer = ItemPilihan.Count - 1 To 0 Step -1
Pegawai.Items.RemoveAt(IdPilihan.Item(IdIdPilihan))
Next
End Sub
Private Sub akp1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles akp1.Click
Pegawai.Items.Add(Akademik.SelectedItem)
Akademik.Items.RemoveAt(Akademik.SelectedIndex)
If Pegawai.Items.Count = 0 Then
Exit Sub
End If
If Pegawai.SelectedItems.Count = 0 Then
MsgBox("Pilih pegawai yang akan dipindahkan")
Exit Sub
End If
Akademik.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
End Sub
Private Sub akp2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles akp2.Click
Dim ItemPilihan As ListBox.SelectedObjectCollection
ItemPilihan = Akademik.SelectedItems
For IndexItemPilihan As Integer = 0 To ItemPilihan.Count - 1
Pegawai.Items.Add(ItemPilihan.Item(IndexItemPilihan))
Next
Dim IdPilihan As ListBox.SelectedIndexCollection
IdPilihan = Akademik.SelectedIndices
For IdIdPilihan As Integer = ItemPilihan.Count - 1 To 0 Step -1
Akademik.Items.RemoveAt(IdPilihan.Item(IdIdPilihan))
Next
End Sub
Private Sub akp3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles akp3.Click
Pegawai.Items.AddRange(Akademik.Items)
Akademik.Items.Clear()
End Sub
Private Sub pkk1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pkk1.Click
keuangan.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
If Pegawai.Items.Count = 0 Then
Exit Sub
End If
If Pegawai.SelectedItems.Count = 0 Then
MsgBox("Pilih pegawai yang akan dipindahkan")
Exit Sub
End If
keuangan.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
End Sub
Private Sub pkk2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pkk2.Click
Dim ItemPilihan As ListBox.SelectedObjectCollection
ItemPilihan = Pegawai.SelectedItems
For IndexItemPilihan As Integer = 0 To ItemPilihan.Count - 1
keuangan.Items.Add(ItemPilihan.Item(IndexItemPilihan))
Next
Dim IdPilihan As ListBox.SelectedIndexCollection
IdPilihan = Pegawai.SelectedIndices
For IdIdPilihan As Integer = ItemPilihan.Count - 1 To 0 Step -1
Pegawai.Items.RemoveAt(IdPilihan.Item(IdIdPilihan))
Next
End Sub
Private Sub pkk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pkk.Click
keuangan.Items.AddRange(Pegawai.Items)
Pegawai.Items.Clear()
End Sub
Private Sub kkp1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kkp1.Click
Pegawai.Items.Add(keuangan.SelectedItem)
keuangan.Items.RemoveAt(keuangan.SelectedIndex)
If keuangan.Items.Count = 0 Then
Exit Sub
End If
If keuangan.SelectedItems.Count = 0 Then
MsgBox("Pilih pegawai yang akan dipindahkan")
Exit Sub
End If
keuangan.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
End Sub
Private Sub kkp2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kkp2.Click
Dim ItemPilihan As ListBox.SelectedObjectCollection
ItemPilihan = keuangan.SelectedItems
For IndexItemPilihan As Integer = 0 To ItemPilihan.Count - 1
Pegawai.Items.Add(ItemPilihan.Item(IndexItemPilihan))
Next
Dim IdPilihan As ListBox.SelectedIndexCollection
IdPilihan = keuangan.SelectedIndices
For IdIdPilihan As Integer = ItemPilihan.Count - 1 To 0 Step -1
keuangan.Items.RemoveAt(IdPilihan.Item(IdIdPilihan))
Next
End Sub
Private Sub kkp3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kkp3.Click
Pegawai.Items.AddRange(keuangan.Items)
keuangan.Items.Clear()
End Sub
Private Sub akk1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles akk1.Click
keuangan.Items.Add(Akademik.SelectedItem)
Akademik.Items.RemoveAt(Akademik.SelectedIndex)
If Akademik.Items.Count = 0 Then
Exit Sub
End If
If Akademik.SelectedItems.Count = 0 Then
MsgBox("Pilih pegawai yang akan dipindahkan")
Exit Sub
End If
keuangan.Items.Add(Pegawai.SelectedItem)
Akademik.Items.RemoveAt(Pegawai.SelectedIndex)
End Sub
Private Sub akk2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles akk2.Click
Dim ItemPilihan As ListBox.SelectedObjectCollection
ItemPilihan = Akademik.SelectedItems
For IndexItemPilihan As Integer = 0 To ItemPilihan.Count - 1
keuangan.Items.Add(ItemPilihan.Item(IndexItemPilihan))
Next
Dim IdPilihan As ListBox.SelectedIndexCollection
IdPilihan = Akademik.SelectedIndices
For IdIdPilihan As Integer = ItemPilihan.Count - 1 To 0 Step -1
Akademik.Items.RemoveAt(IdPilihan.Item(IdIdPilihan))
Next
End Sub
Private Sub akk3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles akk3.Click
keuangan.Items.AddRange(Akademik.Items)
Akademik.Items.Clear()
End Sub
Private Sub kka1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kka1.Click
Akademik.Items.Add(keuangan.SelectedItem)
keuangan.Items.RemoveAt(keuangan.SelectedIndex)
If Pegawai.Items.Count = 0 Then
Exit Sub
End If
If Pegawai.SelectedItems.Count = 0 Then
MsgBox("Pilih pegawai yang akan dipindahkan")
Exit Sub
End If
Akademik.Items.Add(Pegawai.SelectedItem)
Pegawai.Items.RemoveAt(Pegawai.SelectedIndex)
End Sub
Private Sub kka2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kka2.Click
Dim ItemPilihan As ListBox.SelectedObjectCollection
ItemPilihan = keuangan.SelectedItems
For IndexItemPilihan As Integer = 0 To ItemPilihan.Count - 1
Akademik.Items.Add(ItemPilihan.Item(IndexItemPilihan))
Next
Dim IdPilihan As ListBox.SelectedIndexCollection
IdPilihan = keuangan.SelectedIndices
For IdIdPilihan As Integer = ItemPilihan.Count - 1 To 0 Step -1
keuangan.Items.RemoveAt(IdPilihan.Item(IdIdPilihan))
Next
End Sub
Private Sub kka3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kka3.Click
Akademik.Items.AddRange(keuangan.Items)
keuangan.Items.Clear()
End Sub
End Class
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar