Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

PORTOFOLIO

MATA KULIAH
FUNDAMENTAL
PROGRAMMING

NAMA: WIRA INDRAYANA


NIM: 14157049

STIKOM BINANIAGA
BOGOR

1. DIMENSI

Public Class clsdimensi


Public aPanjang As Double
Public aLebar As Double
Public aLuas As Double
Public Sub HITUNGLUAS()
aLuas = aPanjang * aLebar
End Sub
Public aSisi As Double
Public aLuasbs As Double
Public Sub HITUNGLUASB()
aLuasbs = aSisi * aSisi
End Sub
Public aAlas As Double
Public aTinggi As Double
Public Sub HITUNGLUASSK()
aLuasS = aAlas * aTinggi
End Sub
End Class

2. FORM PENGIRIMAN BARANG

Public Class Form1


Private Sub BERSIHLAYAR()
TextBox1.Text = "" : TextBox2.Text = "" : TextBox3.Text = "" : TextBox4.Text =
"" : TextBox5.Text = ""
TextBox6.Text = "" : TextBox7.Text = "" : TextBox8.Text = ""
End Sub
Private Sub HITUNGPAKET()
Dim oJML As Double, oKG As Double, oPKT As Double
oJML = Val(TextBox1.Text)
oKG = Val(TextBox2.Text)
oPKT = oJML * oKG * 20000
TextBox3.Text = oPKT
End Sub
Private Sub HITUNGSUB()
Dim oJML As Double, oKG As Double, oPKT As Double, oTUJ As Double, oADM
As Double, oSUB As Double
oJML = Val(TextBox1.Text)
oKG = Val(TextBox2.Text)
oPKT = oJML * oKG * 20000
oADM = Val(TextBox4.Text)
oTUJ = Val(TextBox5.Text)
oSUB = oPKT + oADM + oTUJ
TextBox6.Text = oSUB

End Sub
Private Sub HITUNGPJK()
Dim oJML As Double, oKG As Double, oPKT As Double, oTUJ As Double, oADM
As Double, oSUB As Double, oPJK As Double, oTOTAL As Double
oJML = Val(TextBox1.Text)
oKG = Val(TextBox2.Text)
oPKT = oJML * oKG * 20000
oADM = Val(TextBox4.Text)
oTUJ = Val(TextBox5.Text)
oSUB = oPKT + oADM + oTUJ
oPJK = oSUB * (10 / 100)
TextBox7.Text = oPJK
End Sub
Private Sub HITUNGTOTAL()
Dim oJML As Double, oKG As Double, oPKT As Double, oTUJ As Double, oADM
As Double, oSUB As Double, oPJK As Double, oTOTAL As Double
oJML = Val(TextBox1.Text)
oKG = Val(TextBox2.Text)
oPKT = oJML * oKG * 20000
oADM = Val(TextBox4.Text)
oTUJ = Val(TextBox5.Text)
oSUB = oPKT + oADM + oTUJ
oPJK = oSUB * (10 / 100)
oTOTAL = oSUB + oPJK
TextBox8.Text = oTOTAL
End Sub
Private Sub Form1_Shown(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Shown
TextBox1.Focus()
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then TextBox2.Focus()
End Sub
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
If e.KeyChar = Chr(13) Then HITUNGPAKET()
End Sub
Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress
If e.KeyChar = Chr(13) Then TextBox5.Focus()
End Sub
Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress
If e.KeyChar = Chr(13) Then HITUNGSUB()
End Sub
Private Sub TextBox6_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox6.KeyPress
If e.KeyChar = Chr(13) Then HITUNGPJK()
End Sub
Private Sub TextBox7_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox7.KeyPress

If e.KeyChar = Chr(13) Then HITUNGTOTAL()


End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
BERSIHLAYAR()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class

3. PULSA

Public Class Form1


Dim pilih_perdana As String
Dim Total_Harga As String
Private Sub BERSIHLAYAR()
COMBPERD1.Text = ""
TextBox2.Text = ""
MSAK1.Text = "##/##/####"
MaskedTextBox1.Text = "##/##/####"
CMBPER2.Text = ""
CMBTOP.Text = ""
MSAK3.Text = "##/##/####"
PLS.Text = ""
TextBox1.Text = ""
BXCALL.Text = ""
HRGSMS.Text = ""
HRGCALL.Text = ""
HRGPPN.Text = ""
SISAPLS.Text = ""
End Sub
Private Sub BTNCLEAR_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BTNCLEAR.Click
BERSIHLAYAR()
End Sub
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs)
If e.KeyChar = Chr(13) Then MSAK1.Focus()
End Sub
Private Sub MSAK1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MSAK1.KeyPress
If e.KeyChar = Chr(13) Then
Dim atgl As Date
atgl = MSAK1.Text
MaskedTextBox1.Text = Format(DateAdd(DateInterval.Month, 2, atgl),
"MM/dd/yyyy")
CMBPER2.Focus()
End If

End Sub
Private Sub CMBTOP_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles CMBTOP.KeyPress
If e.KeyChar = Chr(13) Then
Dim btgl As Date, oPulsa As Double
oPulsa = Val(CMBTOP.Text) / 5000
btgl = MaskedTextBox1.Text
MSAK3.Text = Format(DateAdd(DateInterval.Weekday, 7 * oPulsa, btgl),
"MM/dd/yyyy")
MSAK3.Focus()
End If
End Sub
Private Sub MSAK3_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles MSAK3.KeyPress
If e.KeyChar = Chr(13) Then
Dim hitpls As Double
hitpls = Val(CMBTOP.Text) + Val(TextBox2.Text)
PLS.Text = hitpls
PLS.Focus()
End If
End Sub
Private Sub PLS_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles PLS.KeyPress
If e.KeyChar = Chr(13) Then
TextBox1.Focus()
End If
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then
Dim ttlsms As Double
ttlsms = Val(TextBox1.Text * 150)
HRGSMS.Text = ttlsms
End If
HRGCALL.Focus()
End Sub
Private Sub COMBPERD1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
COMBPERD1.SelectedIndexChanged
pilih_perdana = Val(COMBPERD1.SelectedIndex)
If pilih_perdana = "0" Then
TextBox2.Text = "5000"
ElseIf pilih_perdana = "1" Then
TextBox2.Text = "10000"
ElseIf pilih_perdana = "2" Then
TextBox2.Text = "25000"
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class

4. DAFTAR SIMPANAN KOPERASI

Public Class Form1


Private Sub BERSIHLAYAR()
NAMA.Text = ""
JMLSIMP.Text = ""
SIMPOK.Text = ""
SIMJIB.Text = ""
SIMSUK.Text = ""
PEMASUKAN.Text = ""
TGL.Text = ""
JMLMASUK.Text = ""
JMLBYR.Text = ""
SALSIM.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.GotFocus
BERSIHLAYAR()
End Sub
Private Sub NAMA_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles NAMA.KeyPress
If e.KeyChar = Chr(13) Then JMLSIMP.Focus()
End Sub
Private Sub JMLSIMP_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles JMLSIMP.KeyPress
If e.KeyChar = Chr(13) Then SIMPOK.Focus()
End Sub

Private Sub SIMPOK_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles SIMPOK.KeyPress
If e.KeyChar = Chr(13) Then SIMJIB.Focus()
End Sub
Private Sub SIMJIB_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles SIMJIB.KeyPress
If e.KeyChar = Chr(13) Then SIMSUK.Focus()
End Sub
Private Sub SIMSUK_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles SIMSUK.KeyPress
If e.KeyChar = Chr(13) Then JMLMASUK.Focus()
End Sub
Private Sub JMLMASUK_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles JMLMASUK.KeyPress
If e.KeyChar = Chr(13) Then Transaksi()
End Sub
Private Sub Transaksi()
Dim Pemasukan As Double
Dim Saldosimpanan As Double
Dim JMLSIMPs As Double
Dim SIMPOKs As Double
Dim SIMJIBs As Double
Dim SIMSUKs As Double
Dim JMLMASUKs As Double
JMLSIMPs = JMLSIMP.Text
SIMPOKs = JMLSIMP.Text
SIMJIBs = SIMJIB.Text
SIMSUKs = SIMSUK.Text
JMLMASUKs = JMLMASUK.Text
Pemasukan = JMLSIMPs + SIMPOKs + SIMJIBs + SIMSUKs + JMLMASUKs
JMLSETOR.Text = Pemasukan
End Sub
Private Sub JMLSETOR_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles JMLSETOR.KeyPress
If e.KeyChar = Chr(13) Then JMLBYR.Focus()
End Sub
Private Sub JMLBYR_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles JMLBYR.KeyPress
If e.KeyChar = Chr(13) Then TextBox1.Focus()
End Sub
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Chr(13) Then TextBox2.Focus()
End Sub
Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
If e.KeyChar = Chr(13) Then TextBox3.Focus()
End Sub
Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress
If e.KeyChar = Chr(13) Then TextBox4.Focus()
End Sub
Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress
If e.KeyChar = Chr(13) Then Transaksi2.Focus()

End Sub
Private Sub Transaksi2()
Dim Pengeluaran As Double
Dim JMLBYRs As Double
Dim TextBox1s As Double
Dim TextBox2s As Double
Dim TextBox3s As Double
Dim TextBox4s As Double
JMLBYRs = JMLBYR.Text
TextBox1s = TextBox1.Text
TextBox2s = TextBox2.Text
TextBox3s = TextBox3.Text
TextBox4s = TextBox4.Text
Pengeluaran = JMLBYRs + TextBox1s + TextBox2s + TextBox3s + TextBox4s
TextBox5.Text = Pengeluaran
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class

You might also like