tugas 12 program npm.2

ERLANGGA TUGAS NPM

Private Sub cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdproses_Click()
Dim A As String
Texttm = “20” & Left(Textnpm, 2)
A = Mid(Textnpm, 3, 3)
If A = “100” Then
Textjur = “sistem informasi”
Textps = “strata 1”
ElseIf A = “200” Then
Textjur = “manajemen informatika”
Textps = “diploma 3”
ElseIf A = “300” Then
Textjur = “teknik informatika”
Textps = “diploma 4”
ElseIf A = “400” Then
Textjur = “komputer administrasi”
Textps = “diploma 2”
End If
Textnu = Right(Textnpm, 3)
End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

Iklan

tugas 12 program

ERLANGGA TUGAS 1

Private Sub Cmdbatal_Click()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub
Private Sub cmdlagi_Click()
txtnidn.SetFocus
txtnidn = “”
txtnama = “”
cbogolongan = “”
txtgapok = “”
txttunjangan = “”
txtpajak = “”
txttotal = “”
End Sub

Private Sub Form_load()
cbogolongan.AddItem “I”
cbogolongan.AddItem “II”
cbogolongan.AddItem “III”
cbogolongan.AddItem “IV”
End Sub
Private Sub cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case cbogolongan
Case “I”
gapok = 3500000
tunjangan = 350000
Case “II”
gapok = 2400000
tunjangan = 240000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 1000000
tunjangan = 100000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
txtgapok = gapok
txttunjangan = tunjangan
txtpajak = pajak
txttotal = total – pajak
End Sub
Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

TUGAS 12 PROGRAM NPM

ERLANGGA TUGAS G
Private Sub cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdproses_Click()
Dim jr As String
Dim ps As String
Dim A As String
A = Mid(Textnpm, 3, 1)
If A = 1 Then
jr = “sistem informasi”
ElseIf A = 2 Then
jr = “teknik informatika”
ElseIf A = 3 Then
jr = “menejemen informatika”
ElseIf A = 4 Then
jr = “komputer akuntansi”
End If
Textjur = jr

A = Mid(Textnpm, 4, 2)
If A = “01” Then
ps = “strata 1”
ElseIf A = “02” Then
ps = “diploma 4”
ElseIf A = “03” Then
ps = “diploma 3”
ElseIf A = “04” Then
ps = “diploma 2”
End If
Textps = ps
Texttm = “20” & Left(Textnpm, 2)
Textnu = Right(Textnpm, 3)

End Sub
Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

TUGAS 7 BAGIAN G

NPM ACAK
Private Sub cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnpm = “”
Textjur = “”
Textps = “”
Texttm = “”
Textnu = “”
End Sub

Private Sub Cmdproses_Click()
Dim jr As String
Dim ps As String
Dim A As String
A = Mid(Textnpm, 3, 1)
If A = 1 Then
jr = “sistem informasi”
ElseIf A = 2 Then
jr = “teknik informatika”
ElseIf A = 3 Then
jr = “menejemen informatika”
ElseIf A = 4 Then
jr = “komputer akuntansi”
End If
Textjur = jr

A = Mid(Textnpm, 4, 2)
If A = “01” Then
ps = “strata 1”
bp = “1950000”
ElseIf A = “02” Then
ps = “diploma 4”
bp = “1750000”
ElseIf A = “03” Then
ps = “diploma 3”
bp = “1650000”
ElseIf A = “04” Then
ps = “diploma 2”
bp = “1450000”
End If
Textps = ps
Textbp = bp
Texttm = “20” & Left(Textnpm, 2)
Textnu = Right(Textnpm, 3)

End Sub
Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

TUGAS 8 BAGIAN H

ERLANGGA TUGAS H

 

Private Sub Cbocode_Click()

Dim jenis, hs As String

Select Case Cbocode

Case “P205”

jenis = “Pentium II  500 Mega Hz”

hs = “1500000”

Case “P308”

jenis = “Pentium III 800 Mega Hz ”

hs = “2100000 ”

Case “P310”

jenis = “pentium III 1.0 Giga Hz”

hs = “3500000 ”

Case “P415”

jenis = “Pentium IV  1.5 Giga Hz”

hs = “4000000 ”

Case “P417”

jenis = “Pentium IV  1.7 Giga Hz ”

hs = “4200000 ”

Case “P419”

jenis = “Pentium IV  1.9 Giga Hz”

hs = “5500000 ”

End Select

Textjk = jenis

Texths = hs

Textjj.SetFocus

End Sub

 

 

Private Sub Cmdclose_Click()

End

End Sub

 

 

Private Sub Cmdhl_Click()

Cbocode.SetFocus

Cbocode = “”

Textjk = “”

Texths = “”

Textjj = “”

Textdis = “”

Texthb = “”

End Sub

 

 

 

Private Sub Cmdproses_Click()

Texthp = Val(Textjj) * Val(Texths)

If Val(Texthp) > “30000000” Then

Textdis = Val(Texthp) * 15 / 100

ElseIf Val(Texthp) > “25000000” Then

Textdis = Val(Texthp) * 10 / 100

ElseIf Val(Texthp) > “20000000” Then

Textdis = Val(Texthp) * 5 / 100

ElseIf Val(Texthp) > “15000000” Then

Textdis = Val(Texthp) * 2 / 100

End If

Texttotal = Val(Texthp) – Val(Textdis)

End Sub

 

 

 

Private Sub Form_Load()

Cbocode.AddItem “P205”

Cbocode.AddItem “P308”

Cbocode.AddItem “P310”

Cbocode.AddItem “P415”

Cbocode.AddItem “P417”

Cbocode.AddItem “P419”

End Sub

 

 

 

TUGAS 9 BAGIAN I

ERLANGGA TUGAS I

Private Sub Cmdbatal_Click()
Textnama.SetFocus
Textnama = “”
Textnik = “”
Textgol = “”
Textks = “”
Textstt = “”
Textt = “”
Textjab = “”
Textbag = “”
Textgp = “”
Texttun = “”
Texttg = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
Textnama.SetFocus
Textnama = “”
Textnik = “”
Textgol = “”
Textks = “”
Textstt = “”
Textt = “”
Textjab = “”
Textbag = “”
Textgp = “”
Texttun = “”
Texttg = “”
End Sub

Private Sub Cmdproses_Click()
Dim r As String
r = Mid(Textnik.Text, 5, 1)
If r = “A” Then
Textgol = “A”
Textjab.Text = “MANAGER”
Textgp.Text = “4000000”
Texttun.Text = “1025000”
ElseIf r = “B” Then
Textgol.Text = “B”
Textjab.Text = “Ka.SEKSI”
Textgp.Text = “3500000”
Texttun.Text = “975000”
ElseIf r = “C” Then
Textgol.Text = “C”
Textjab.Text = “STAFF”
Textgp.Text = “3000000”
Texttun.Text = “925000”
End If
r = Right(Textnik.Text, 3)
If r = “KEU” Then
Textbag.Text = “ACCOUNTING”
ElseIf r = “ADM” Then
Textbag.Text = “ADMINISTRASI”
ElseIf r = “SDM” Then
Textbag.Text = “GENERAL AFFAIR”
ElseIf r = “EDP” Then
Textbag.Text = “IT UNIT”
ElseIf r = “SPM” Then
Textbag.Text = “SECURITY”
End If
r = Mid(Textnik.Text, 7, 1)
If r = “S” Then
ks = “S”
Stt = “SINGLE”
ElseIf r = “M” Then
ks = “M”
Stt = “MENIKAH”
ElseIf r = “J” Then
ks = “J”
Stt = “JANDA”
ElseIf r = “D” Then
ks = “D”
Stt = “DUDA”
End If
Textks.Text = ks
Textstt.Text = Stt
Textt.Text = Left(Textnik.Text, 4)
Texttg.Text = Val(Textgp.Text) + Val(Texttun.Text)
End Sub
Private Sub Form_Activate()
Textnama.SetFocus
End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnik.SetFocus
End If
End Sub

TUGAS 6 BAGIAN F

ERLANGGA TGS F
Private Sub Cbocode_Click()
Dim merk, hs As String
Select Case Cbocode
Case “Asus A43SA”
merk = “Asus A43SA-VX090D”
hs = “5500000”
Case “Asus A43SD”
merk = “Asus A43SD-VX052D”
hs = “4500000”
Case “Asus A43SJ”
merk = “Asus A43SJ-VX792D”
hs = “4300000”
Case “Asus A43TA”
merk = “Asus A43TA-VX034D”
hs = “4900000”
Case “Asus N43SL”
merk = “Asus N43SL-VX264D”
hs = “4300000”
Case “Apple MD311”
merk = “Apple MacBook Pro MD311”
hs = “19300000”
Case “Apple MD313”
merk = “Apple MacBook Pro MD313”
hs = “24200000”
Case “Apple MD314”
merk = “Apple MacBook Pro MD314”
hs = “11900000”
Case “Apple MD322”
merk = “Apple MacBook Pro MD322”
hs = “14700000”
Case “Apple MC965”
merk = “Apple MacBook Air MC965”
hs = “21300000”
End Select
Textmerk = merk
Texths = hs
Textjj.SetFocus
End Sub

Private Sub cmdhitung_Click()
Cbocode.SetFocus
Cbocode = “”
Textmerk = “”
Texths = “”
Textjj = “”
Texthp = “”
Textdis = “”
Texttotal = “”
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > 140000000 Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > 135000000 Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > 130000000 Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > 125000000 Then
Textdis = Val(Texthp) * 2 / 100
End If
Texttotal = Val(Texthp) – Val(txtdis)
End Sub

Private Sub Form_Load()
Cbocode.AddItem “Asus A43SA”
Cbocode.AddItem “Asus A43SD”
Cbocode.AddItem “Asus A43SJ”
Cbocode.AddItem “Asus A43TA”
Cbocode.AddItem “Asus N43SL”
Cbocode.AddItem “Apple MD311”
Cbocode.AddItem “Apple MD313”
Cbocode.AddItem “Apple MD314”
Cbocode.AddItem “Apple MD322”
Cbocode.AddItem “Apple MC965”
End Sub
Private Sub Textjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texthp.SetFocus
End If
End Sub

TUGAS 5 BAGIAN E

ERLANGGA TUGAS E

Private Sub Cmdbatal_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtjb.Text = “”

txtpeng.Text = “”

Txttp.Text = “”

Txtpen.Text = “”

Txtharga.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtjb.Text = “”

txtpeng.Text = “”

Txttp.Text = “”

Txtpen.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttp.Text = “20” & Mid(Txtkode, 5, 2)

S = Left(Txtkode, 3)

If S = “SIM” Then

Txtjb.Text = “Sistem Informasi Manajemen”

txtpeng.Text = “Fadiya Ulfa”

Txtharga.Text = “75900”

ElseIf S = “EDP” Then

Txtjb.Text = “Elektronik Data Processing”

txtpeng.Text = “Nurul Agustina”

Txtharga.Text = “62000”

ElseIf S = “MNJ” Then

Txtjb.Text = “Manajemen”

txtpeng.Text = “Rian Hidayat”

Txtharga.Text = “42000”

ElseIf S = “CDR” Then

Txtjb.Text = “Corel Draw”

txtpeng.Text = “Siti Nur Khotimah”

Txtharga.Text = “53000”

ElseIf S = “RPL” Then

Txtjb.Text = “Rekayasa Perangkat Lunak”

txtpeng.Text = “Winda Erlianti”

Txtharga.Text = “83000”

End If

S = Right(Txtkode, 1)

If S = “A” Then

Txtpen.Text = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

Txtpen.Text = “Indah Surabaya”

ElseIf S = “S” Then

Txtpen.Text = “Salemba Empat”

ElseIf S = “E” Then

Txtpen.Text = “Elek Media Komputindo”

ElseIf S = “M” Then

Txtpen.Text = “Maxicom”

End If

End Sub

 

 

TUGAS 4 BAGIAN D

ERLANGGA TUGAS D
Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Cmbcode.SetFocus
Cmbcode = “”
Textjb = “”
Textpeng = “”
Texttt = “”
Textpen = “”
Textharga = “”
End Sub

Private Sub cmdproses_Click()
Dim judul, pengarang, tahun, penerbit, harga As String
Select Case Cmbcode
Case “A-SIM-01”
judul = “SistemInformasiManajemen”
pengarang = “YatiNurOktavia”
tahun = “2001”
penerbit = “Andi Offset Yogyakarta”
harga = “75900”
Case “I-EDP-02”
judul = “ElektronikData Processing”
pengarang = “Imam Tarmizi”
tahun = “2002”
penerbit = “Indah Surabaya”
harga = “62000”
Case “S-MNJ-03”
judul = “Manajemen”
pengarang = “Valentina Mariana Adiwianti”
tahun = “2003”
penerbit = “SalembaEmpat”
harga = “42000”
Case “E-CDR-04”
judul = “Corel Draw”
pengarang = “RiyanSuhandi”
tahun = “2004”
penerbit = “Elek Media Komputindo”
harga = “53000”
Case “M-RPL-05”
judul = “RekayasaPerangkatLunak”
pengarang = “SintaUmpuSinga”
tahun = “2005”
penerbit = “Maxicom”
harga = “83000”
End Select
Textjb = judul
Textpeng = pengarang
Texttt = tahun
Textpen = penerbit
Textharga = harga
End Sub

Private Sub Cndbatal_Click()
Cmbcode.SetFocus
Cmbcode = “”
Textjb = “”
Textpeng = “”
Texttt = “”
Textpen = “”
Textharga = “”
End Sub

Private Sub Form_Load()
Cmbcode.AddItem “A-SIM-01”
Cmbcode.AddItem “I-EDP-02”
Cmbcode.AddItem “S-MNJ-03”
Cmbcode.AddItem “E-CDR-04”
Cmbcode.AddItem “M-RPL-05”
End Sub

TUGAS 3 BAGIAN C

ERLANGGA TUGAS C
Private Sub Cbocode_Click()
Dim jenis, hs As String
Select Case Cbocode
Case “P205”
jenis = “Pentium II 500 Mega Hz”
hs = “1500000”
Case “P308”
jenis = “Pentium III 800 Mega Hz ”
hs = “2100000 ”
Case “P310”
jenis = “pentium III 1.0 Giga Hz”
hs = “3500000 ”
Case “P415”
jenis = “Pentium IV 1.5 Giga Hz”
hs = “4000000 ”
Case “P417”
jenis = “Pentium IV 1.7 Giga Hz ”
hs = “4200000 ”
Case “P419”
jenis = “Pentium IV 1.9 Giga Hz”
hs = “5500000 ”
End Select
Textjk = jenis
Texths = hs
Textjj.SetFocus
End Sub
Private Sub Cmdclose_Click()
End
End Sub
Private Sub Cmdhl_Click()
Cbocode.SetFocus
Cbocode = “”
Textjk = “”
Texths = “”
Textjj = “”
Textdis = “”
Texthb = “”
End Sub

Private Sub Cmdproses_Click()
Texthp = Val(Textjj) * Val(Texths)
If Val(Texthp) > “30000000” Then
Textdis = Val(Texthp) * 15 / 100
ElseIf Val(Texthp) > “25000000” Then
Textdis = Val(Texthp) * 10 / 100
ElseIf Val(Texthp) > “20000000” Then
Textdis = Val(Texthp) * 5 / 100
ElseIf Val(Texthp) > “15000000” Then
Textdis = Val(Texthp) * 2 / 100
End If
Texthb = Val(Texthp) – Val(Textdis)
End Sub

Private Sub Form_Load()
Cbocode.AddItem “P205”
Cbocode.AddItem “P308”
Cbocode.AddItem “P310”
Cbocode.AddItem “P415”
Cbocode.AddItem “P417”
Cbocode.AddItem “P419”
End Sub