TUGAS VB4

4.1 PT PULANG PETANG

Private sun txtnama_keypress(key ASCII As Integer)

if keyASCII = 13 Then

txtNIK.SetFocus

end if

end sub

Private sub cmdproses_click()

dim jbt, BG As string

dim GP, TJ, TG As curency

txt tahun.text = left (txtnik.text,4)

G = Mid (txtnik.text,5,1)

if G = “A” Then

G = “A”

JBT = “Manajer”

GP = “400000”

TJ = “1025000”

Else if G = “B” Then

G = “B”

JBT = “Kep.seksi”

GP = “3500000”

TJ = “975000”

Elself G = “C” Then

G = “C”

JBT = “staff”

GP = “3000000”

TJ = “925000”

End if

txtGol.text = G

txtjabatan.text = JBT

txtGapok.text = GP

txtTunjangan.text = TJ

KS = Mid (txtnik.text,7,1)

if ks = “S” Then

ks = “S”

ks status = “single”

Else if ks = “M” Then

ks = “M”

ks status = “menikah”

Else if ks = “J” Then

ks = “J”

ks status = “janda”

Else if ks = “D” Then

ks = “D”

ks status = “duda”

End if

txtkode.text = ks

txtstatus.text = ks status

TG=val(txtgapok.text)+val(txttunjangan.text)txt total G.text=TG

B= Right(txtnik.text,3)

if B= “Keu” Then

txt Bg.text=”acurency”

Else if B= “ADM” Then

txt Bg.text= “Administrasi”

Else if B= “SDM” Then

txt Bg.text= ” General affair”

Else if B= “EDP” Then

txt Bg .text= “IT Unit”

Else if B=”SPM” Then

txt Bg.text= “Security”

End if

End sub

private sub cmdkeluar_click()

end

end sub

Private Sub CmdBatal_click()

TxtNAMA.SetFocus

TxtNAMA.Text=””

TxtNIK.Text=””

TxtGOL.Text=””

TxtKS.Text=””

TxtSTS.Text=””

TxtTH.Text=””

TxtJBT.Text=””

TxtBGN.Text=””

TxtGP.Text=””

TxtTJ.Text=””

TxtTG.Text=””

End sub

Private Sub CmdzhLAGI_Click()

TxtZHNAMA.SetFocus

TxtZHNAMA.Text=””

TxtZHNIK.Text=””

TxtZHGOL.Text=””

TxtZHKS.Text=””

TxtZHSTS.Text=””

TxtZHTH.Text=””

TxtZHJBT.Text=””

TxtZHBGN.Text=””

TxtZHGP.Text=””

TxtZHTJ.Text=””

TxtZHTG.Text=””

End sub

 

4.2 DATA BUKU STMIK PRINGSEWU

Private sub cmdproses_click()

dim JB, PGR, PRBIT, As string

dim TI, HRG, As curency

Txtkode buku.text=Left(txtkode buku.text,3)

if TB=”SIM” Then

TB= “SIM”

JB= “SISTEM INFORMASI MANAJEMEN”

PGR= ” FADIYA ULFA”

HRG= “75900”

Else if TB=”EDP” Then

TB= “EDP”

JB= “ELEKTRONIK DATA PROCESSING”

PGR= ” NURUL AGUSTINA”

HRG= “62000”

Else if TB=”MNJ” Then

TB= “MNJ”

JB= MANAJEMEN”

PGR= ” RIAN HIDAYAT”

HRG= “42000”

Else if TB=”CDR” Then

TB= “CDR”

JB= “COREL DRAW”

PGR= ” SITI NUR KHOTIMAH”

HRG= “53000”

Else if TB=”RPL” Then

TB= “RPL”

JB= “REKAYASA PERANGKAT LUNAK”

PGR= ” WINDA ERLIANTI”

HRG= “83000”

End if

txt Tipe Buku.text=TB

txt Judul Buku.text=JB

txt Pengarang.text=PGR

txt Harga.text=HRG

txt tahun terbit.text=”20″& MID (txtkode buku,text,5,2)

KB= Right (txtkode buku.text,1)

if KB= “A” Then

KB= “A”

PNRBIT=”ANDI OFFSET YOGYAKARTA”

Else if KB= “I” Then

KB= “I”

PNRBIT=”INDAH SURABAYA”

Else if KB= “S” Then

KB= “S”

PNRBIT=”SALEMBA EMPAT”

Else if KB= “E” Then

KB= “E”

PNRBIT=”ELEK MEDIA KOMPUTINDO”

Else if KB= “M” Then

KB= “M”

PNRBIT=”MAXICOM”

End if

txtkode buku.text=”KB”

txtpenerbit.text=”PNRBIT”

Private sub cmdkeluar_click()

end

end sub

Private sub cmdbatal_click()

txtkode buku.SetFocus

txtkode buku.text=””

txtjudul buku.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

Private sub cmdkeluar_click()

undload me

end sub

Private sub cmdlagi_click()

txtkode buku.SetFocus

txtkode buku.text=””

txtjudul buku.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

end sub

 

4.3 DATA BUKU STMIK PRINGSEWU 2

Private sub cmdproses_click()

dim JB, PGR, PNRBIT, As String

dim TT, HRG, As Curency

Txtkode buku.text=left(txtkode buku.text1)

if KB= “A” Then

KB= “A”

PNRBIT= “ANDI OFFSET YOGYAKARTA”

Else if KB= “I” Then

KB= “I”

PNRBIT= “INDAH SURABAYA”

Else if KB= “S” Then

KB= “S”

PNRBIT= “SALEMBA EMPAT”

Else if KB= “E” Then

KB= “E”

PNRBIT= “ELEK MEDIA KOPUNTINDO”

Else if KB= “M” Then

KB= “M”

PNRBIT= “MAXICOM”

End if

txtkode buku.text=KB

txtpenerbit.text=PNRBIT

kode buku=MID(Txtkode buku.text,5,3)

if TB=”SIM” Then

TB=”SIM”

JB=”SISTEM INFORMASI MANAJEMEN”

PGR=”ANDRA SETIAWAN”

HRG=”75900″

Else if TB=”EDP” Then

TB= “EDP”

JB= “ELEKTRONIK DATA PROCESSING”

PGR= ” DESI ISTIQOMAH”

HRG= “62000”

Else if TB=”EMJ” Then

TB= “EMJ”

JB= MANAJEMEN”

PGR= ” SANDI FITRAJAYA”

HRG= “42000”

Else if TB=”CDR” Then

TB= “CDR”

JB= “COREL DRAW”

PGR= ” TRI INDAH SARI”

HRG= “53000”

Else if TB=”RPL” Then

TB= “RPL”

JB= “REKAYASA PERANGKAT LUNAK”

PGR= ” ERNITA”

HRG= “83000”

End if

txt Tipe buku.text=TB

txt Judul buku.text=JB

txt Pengarang.text=PGR

txt Harga.text=HRG

Txt tahun terbit=”20″ & Right (txtkode buku.text,2)

Private sub cmdkeluar_click()

End

End sub

Private sub cmdbatal_click()

txtkode buku.SetFocus

txtkode buku.text=””

txtjudul.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

Private sub cmdlagi_click()

txtkode buku.SetFocus

txtkode buku.text=””

txtjudul.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

End sub

 

4.4 DATA BUKU STMIK PRINGSEWU 3 (Combo)

private sub CboKode buku_click()

select case CboKode buku.text

case “A-SIM-01”

case “I-EDP-02”

case “A-MNJ-03”

case “S-CDR-04”

case “M-RPL-05”

End select

End sub

Private sub cmdproses_click()

dim PNRBIT, JB, PGR As String

dim HRG As Curency

penerbit= Left (cbokode buku.text,1)

if PNRBIT= “A” Then

PNRBIT= “A”

Penerbit= ” ANDI OFFSET YOGYAKARTA”

Else if PNRBIT= “I” Then

PNRBIT= “I”

Penerbit= ” INDAH SURABAYA”

Else if PNRBIT= “S” Then

PNRBIT= “S”

Penerbit= “SALEMBA EMPAT”

Else if PNRBIT= “E” Then

PNRBIT= “E”

Penerbit= ” ELEK MEDIA COMPUTINDO”

Else if PNRBIT= “M” Then

PNRBIT= “M”

Penerbit= “MAXICOM”

End if

txtpnrbit.text=penerbit

JB= MID(cbokode buku.text,5,3)

if JB= “SIM” Then

JB= “Sistem Informasi Manajemen”

PGR= “YATI NUR OKTAVIA”

HRG= “759000”

Else if JB= “EDP” Then

JB= “ELEKTRONIK DATA PROCESSING”

PGR= “IMAM TARMIZI”

HRG= “62000”

Else if JB= “MNJ” Then

JB= “MANAJEMEN”

PGR= “VALENTINA MARIANA ADI WIANTI”

HRG= “42000”

Else if JB= “CDR” Then

JB= “COREL DRAW”

PGR= “RIYAN SUHANDI”

HRG= “53000”

Else if JB= “RPL” Then

JB= “REKAYASA PERANGKAT LUNAK”

PGR= “SANTA UMPU SINA”

HRG= “83000”

End if

txtJB.text= judul buku

txtPGR.text= pengarang

txtHRG.text= harga

Tahun= “20” & Right (cbokode buku.text,2)

txtTT.text= tahun terbit

End sub

Private sub form_load()

cbokode buku.addItem”A-SIM-01″

cbokode buku.addItem”I-EDP-02″

cbokode buku.addItem”S-MNJ-03″

cbokode buku.addItem”E-CDR-04″

cbokode buku.addItem”M-RPL-05″

End sub

Private sub cmdkeluar_click()

unload me

End sub

Private sub cmdlagi_()

kosong

end sub

public sub kosong ()

cbokode buku.SetFocus

Cbokode buku.text=””

Cbojudul buku.text=””

Cbopengarang.text=””

txtpenerbit.text=””

txtharga.text=””

txttahun terbit.text=””

End sub

Advertisements