tugas vb 5

database

ariana

Private Sub CmdPROSES_Click()
Dim JURUSAN, PRODI As String
TxtTAHUN.Text = “20” & Left(TxtNPM.Text, 2)
JURUSAN = Mid(TxtNPM.Text, 3, 1)
If JURUSAN = “1” Then
TxtJUR.Text = “Sistem Informasi”
ElseIf JURUSAN = “2” Then
TxtJUR.Text = “Manajemen Informatika”
ElseIf JURUSAN = “3” Then
TxtJUR.Text = “Tehnik Informatika”
End If

PRODI = Mid(TxtNPM.Text, 4, 2)
If PRODI = “01” Then
TxtPS.Text = “Strata Satu”
ElseIf PRODI = “02” Then
TxtPS.Text = “Diploma Tiga”
ElseIf PRODI = “03” Then
TxtPS.Text = “Diploma Satu”
End If
TxtNO.Text = Right(TxtNPM,.Text, 3)
End Sub

Private Sub CmdBARU_Click()
Data1.Recordset.AddNew
End Sub

Private Sub CmdSIMPAN_Click()
Data1.Recordset.Update
End Sub

Private Sub CmdHAPUS_Click()
Data1.Recordset.Delete
End Sub

Private Sub TxtNAMA_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtNPM.SetFocus
End If
End Sub

Private Sub CmdKELUAR_Click()
End
End Sub

Dipublikasi di Uncategorized | Meninggalkan komentar

tugas vb 4

4.1  privat sub cmdproses_click()

dim jb, pgr, pnrb, as string

dim tt, hrg as curuncy

txtkode buku.tekt=left(txtkode buku.tex,3)

if m =”sim”then

m =”sim”

jb= “sistem informasi manajemen”

pgr =” fadya ulfa”

hrg =” 75900”

else if m =”edp”then

m =”edp”

jb= “electronjk data procesing”

pgr =” nurul agustina”

hrg =” 62000”

else if m =”mnj”then

m =”mnj”

jb= ”manajemen”

pgr =” riyan hidayat”

hrg =” 42000”

else if m =”cdr”then

m =”cdr”

jb= ”corel draw”

pgr =” siti nur khotimah”

hrg =” 53000”

else if m =”rpl”then

m =”rpl”

jb= ”rekayasa prangkat lunak”

pgr =” winda erlianti”

hrg =” 83000”

end if

txt merk buku.text=m

txt judul buku.text=jb

txtpengarang.text=pgr

txtharga.text=hrg

txttahun terbit.text=”20”&mid (txtkode buku.text,6,2)

kb=right (txtkode buku.text,1)

if kb=”a” then

kb=”a”

pnrb=”andi offset yogyakarta”

else if kb=”i” then

kb=”i”

pnrb=”indah surabaya’

else if kb=”s” then

kb=”s”

pnrb=”salemba empat”

else if kb=”e” then

kb=”e”

pnrb=”elek media komputindo”

else if kb=”m” then

kb=”m”

pnrb=”maxicom”

end if

txt kode buku.text=kb

txt penerbit.text=pnrb

private sub cmdkeluar_click()

end

end sub

private sub cmd batal_click()

txtkode buku.set focus

txtkode buku.text=””

txtjudul buku.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

privat sub cmd lagi_click()

txtkode buku.set focus

txtkode buku.text=””

txtjudul buku.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

end sub

4.2 privat sub cmd proses_click()

dim  jb, pgr, pnrb as string

dim tt,hrg as curency

txt kode buku.text= left(txtkode buku.text,1)

if kb=”a” then

kb=”a”

pnrb=”andi ofset yogyakarta”

else if kb=”i” then

kb=”i”

pnrb=”indah surabaya”

else if kb=”s” then

kb=”s”

pnrb=”salemba empat”

else if kb=”e” then

kb=”e”

pnrb=”elek media komputer”

else if kb=”m” then

kb=”m”

pnrb=”maxicom”

end if

txt kode buku.text=kb

txt penerbit.text=pnrb

kb=mid(txt kode buku.text,5,3)

if m =”sim”then

m=”sim”

jb=”sistem informasi manajemen”

pgr=”andra setiawan”

hrg=”75900”

else if m =”edp”then

m=”edp”

jb=”elektronik data procesing”

pgr=”desi istikomah”

hrg=”62000”

else if m =”emj”then

m=”emj”

jb=”manajemen”

pgr=”sandi fitrajaya”

hrg=”42000”

else if m =”cdr”then

m=”cdr”

jb=”corel draw”

pgr=”tri indah sari”

hrg=”53000”

else if m =”rpl”then

m=”rpl”

jb=”rekayasa  prangkat lunak”

pgr=”ernita”

hrg=”83000”

end if

txtmerkbuku.text=m

txtjudul buku.text=jb

txtpengarang.text=pgr

txtharga.text=hrg

txt tahunterbit.text=”20”&right(txt kode buku.text,2)

private sub cmdkeluar_click()

end

end sub

private sub cmd batal_click()

txtkode buku.set focus

txtkode buku.text=””

txtjudul buku.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

privat sub cmd lagi_click()

txtkode buku.set focus

txtkode buku.text=””

txtjudul buku.text=””

txtpengarang.text=””

txttahun terbit.text=””

txtpenerbit.text=””

txtharga.text=””

end sub

4.3 privat sub txt nama_keypress(key as cii integer)

if key as cii = then

txt nik.set focus

end if

end sub

privat sub cmd proses_click()

dim jbt, bg, as string

dim gb,tj,tg, as curency

txttahun.text=left(txtnik .text,4)

g=mid(txtnik.text,5,1)

if g=”a”then

g=”a”

jbt=”manajer”

gp=”4000000”

tj=”1025000”

else if g=”b”then

g=”b”

jbt=”kep seksi”

gp=”3500000”

tj=”475000”

else if g=”c”then

g=”c”

jbt=”staf”

gp=”3000000”

tj=”925000”

end if

txt gol.text=g

txt jabatan.text=jbt

txt gapokl.text=gp

txt tunjangan.text=tj

ks=mid(txt nik.text,7,1)

if= ks=”s”then

ks=”s”

ks statua=” single”

else if= ks=”m”then

ks=”m”

ks statua=” maried”

else if= ks=”j”then

ks=”j”

ks statua=” janda”

else if= ks=”d”then

ks=”d”

ks statua=” duda”

end if

txtkode.text=ks

txtstatus.text=ks status

tg=val(txt gapok.text)+val (txt tujangan.text)

txttotal g.text=tg

b=right(txtnik.text,3)

if b=”keu” then

txt bagian.text.text=”curency”

else if b=”adm” then

txtbg.text=”administrasi”

else if b=”sdm” then

txtbg.text=”general afair”

else if b=”edp” then

txtbg.text=”it unit”

else if b=”spm” then

txtbg.text=”asurency”

end if

end sub

4.4 privat sub cbokb_click()

select case cbokb.text

case”a-sim-01”

case”i-edp-02”

case”s-mnj-03”

case”e-cdr-04”

case”m-rpl-05”

end select

end sub

privat sub cmdkb proses_click()

dim, penerbit, judul, pengarang as string

dim harga as curency

pnerbit =left(cbokb.text,1)

ifpenerbit =”a”

penerbit=”andi ofset yogyakarta”

else if penerbit=”i”then

penerbit=”indah surabaya”

ifpenerbit =”s”

penerbit=”salemba empat”

else if penerbit=”e”then

penerbit=”elek media komputindo”

else if penerbit=”m”then

penerbit=”maxicom”

end if

txt pnrb.text=penerbit

judul=mid(cbokode buku.text,3,3)

if judul=”sim” then

judul=”sistem informasi manajemen”

pengarang=”yati nur oktavia”

harga=”75900”

if judul=”edp” then

judul=”elektronik data procesing”

pengarang=”imam tarmizi”

harga=”62000”

elseif judul= ”mnj” then

judul=” manajemen”

pengarang=”valentina mariana adiawantu”

harga=”42000”

elseif judul= ”cdr” then

judul=” corel draw”

pengarang=”riyan suhandi”

harga=”53000”

elseif judul= ”rpl” then

judul=” rekayasa prangkat lunak”

pengarang=”sinta umpu singa”

harga=”83000”.

end if

txtkb.text=judul

txtpgr.text=pengarang

txthrg.text=harga

tahun=”20”&right(cbokb.text,2)

txtth.text=tahun

end sub

privatub form_load()

cbokb.additem”a-sim-01”

cbokb.additem”i-edp-02”

cbokb.additem”s-mnj-03”

cbokb.additem”e-cdr-04”

cbokb.additem”m-rpl-05”

end sub

private sub cmd keluar_click()

unload me

end sub

private sub cmd lagi_click()

kosong

end sub

private sub cmd batal_click()

kosong

end sub

publik sub kosong()

cbokb.setfocus

cbokb.text=””

cbojb.text=””

cbopgr.text=””

cbopnrg.text=””

cboharga.text=””

cboth.text=””

end sub

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dipublikasi di Uncategorized | Meninggalkan komentar

tugas vb 3

1.  HURUF MUTU MAHASISWA STMIK PRINGSEWU

privat sub cbonpm_click()

case”12100011″

nama=”ariana”

jurusan=”sistem informasi”

case”12100012″

nama=”umi nafingah”

jurusan=”sistem informasi”

case”12100013″

nama=”avita sari”

jurusan=”sistem informasi”

case”12100014″

nama=”mulyono”

jurusan=”manajemen informatika”

case”12100015″

nama=”hidayati”

jurusan=”manajemen informatika”

end select

txtnama.text=nama

txtjurusan.text=jurusan

txtkuis.setfocus

end sub

private sub cmdbatal_click()

cbonpm.setfocus

cbonpm.text=””

txtnama.text=””

txtjurusan.text=””

txtkuis.text=””

txttugas.text=””

txtuts.text=””

txtuas.text=””

txtna.text=””

txthn.text=””

end sub

private sub cmdkeluar_click()

unloadme

end sub

private sub cmdproses _click()

dim na as integer

dim hn as string

quis’=val(txtquis.text)

tugas=val(txttugas.text)

uts=val(txtuts.text)

uas=val(txtuas.text)

na=(quis+tugas+uts+uas)/4

txtna.text=na

select case txtna.text

case is>80

HM=”A”

case is>70

HM=”B”

case is>60

HM=”C”

case is>50

HM=”D”

case is<50

HM=”E”

end select

txthm.text=hm

end sub

privat sub form_load()

cbonpm additem”12100011″

cbonpm additem”12100012″

cbonpm additem”12100013″

cbonpm additem”12100014″

cbonpm additem”12100015″

end sub

private sub txtquis_keypress(keyascii as integer)

if key ascii=13 then

txttugas.setfocus

end if

end sub

private sub txttugas_keypress(keyascii as integer)

if key ascii=13 then

txtuts.setfocus

end if

end sub

private sub txtuts_keypress(keyascii as integer)

if key ascii=13 then

txtusa.setfocus

end if

end sub

2.  STMIK PRINGSEWU

private sub command 1_click()

label2.caption = text1.text

end sub

private sub command 2_click()

end

end sub

private sub option1_click()

label2.forecolor=vbblue

end sub

private sub option2_click()

label2.forecolor=vbred

end sub

private sub chek1_click()

label2.fontbold=check1.value

end sub

private sub chek2_click()

label2.fontitalic=check2.value

end sub

3.NDN, NAMA PEGAWAI, GOLONGAN

private sub cmdbatal_click()

kosong

end sub

private sub cmdlagi_click()

kosong

end sub

private sub form_load()

cbogolongan.additem”I”

cbogolongan.additem”II”

cbogolongan.additem”III”

cbogolongan.additem”IV”

end sub

private sub cmdkeluar_click()

unload me

end sub

private sub cbogolongan_click()

dim gapok, pajak, tunjangan, total as variant

select case cbogolongan_click()

case”I”

gapok=1500000

tunjangan=150000

case”II”

gapok=2000000

tunjangan=200000

case”III”

gapok=2500000

tunjangan=250000

case”I”

gapok=3000000

tunjangan=300000

case else

gapok=0

tunjangan=0

end select

total=gapok+tunjangan

pajak=total*0,1

txt gapok.text=gapok

txt tunjangan.text=tunjangan

txt pajak.text=pajak

txttotal.text=total-pajak

end sub

public sub kosong()

txtnidn.set focus

txtnidn.text=””

txtnama.text=””

cbogolongan .text=””

txtgapok.text=””

txttunjangan.text=””

txtpajak.text=””

txttotal.text=””

end sub

private sub txtnind_keypress(keyascii as integer)

if key ascii=13 then

txtnama.setfocus

end if

end sub

4.  NAMA NPM

private sub cmdbatal_click()

txtnama.setfocus

txtnama.text=””

txtnpm.text=””

txtjur.text=””

txtps.text=””

txttm.text=””

txturut.text=””

end sub

private sub cmdkeluar_click()

unloadme

end sub

private sub cmdlagi_click()

txtnama.setfocus

txtnama.text=””

txtnpm.text=””

txtjur.text=””

txtps.text=””

txttm.text=””

txturut.text=””

end sub

private sub cmd proses_click()

dim s as string

txttm.text=”20″&left(txtnpm.text,2)

s=mid(txtnpm.text,3,1)

ifs=”1″then

txtjur.text=”sistem informasi”

elself s =”2″then

txtjur.text=”sistem informasi”

elself s =”3″then

txtjur.text=”sistem informasi”

elself s =”4″then

txtjur.text=”manajemen informatika”

end if

s=mid(txtnpm.text, 4, 2)

if s=”0,1″then

txtps.text=”strata satu”

elself s=”0,2″then

txtps.text=”strata satu”

elself s=”0,3″then

txtps.text=”strata satu”

elself s=”0,4″then

txtps.text=”manajamen informatika”

end if

txturut.text=right(txtnpm.text,3)

end sub

private sub form_activate()

txtnama.text=””

txtnpm.text=””

txtjur.text=””

txtps.text=””

txttm.text=””

txturut.text=””

end sub

private sub txtnama_keypress(keyascii as integer)

if key ascii= 13then

txtnpm.setfocus

end if

end sub

txtna.text=””

txthn.text=””

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dipublikasi di Uncategorized | Meninggalkan komentar

tugas VB2

TUGAS 2 VB

Dipublikasi di Uncategorized | Meninggalkan komentar