Pages

Latihan 6 Sistem Basis Data

 
Command Button Hitung
with thisform
if val(.text2.value) > 10
                .text3.value="10%"
                .text4.value= val(.text1.value)*val(.text2.value)-0.1*val(.text1.value)*val(.text2.value)
                .text5.value="Anda mendapatkan diskon sebanyak 10%"
else
if val(.text2.value) = 10
                .text3.value="5%"
                .text4.value= val(.text1.value)*val(.text2.value)-0.05*val(.text1.value)*val(.text2.value)
                .text5.value="Anda mendapatkan diskon sebanyak 5%"
else
                .text3.value="0%"
                .text4.value= val(.text1.value)*val(.text2.value)
                .text5.value="Anda tidak mendapatkan diskon"
endif
endif
endwith
Command Button Clear
with thisform
.text1.value=""
.text2.value=""
.text3.value=""
.text4.value=""
.text5.value=""
.text6.value=""
endwith
Command Button Exit
thisform.release()
Hasil Run

0 komentar:

Posting Komentar