RSS

Apliksi gaji karyawan(visual basic)

04 May

Private Sub Cmbstatus_Click()
‘If Me.Cmbstatus.Text = “kawin” Then
‘Me.txtjmlanak.Enabled = True’
Else
‘Me.txtjmlanak.Enabled = False’
End If
End Sub
Private Sub cmddelete_Click()
Set Tbnim = mydbase.OpenRecordset(“select * from peg where nama = ‘” & Me.txtnama.Text & “‘”)

If Tbnim.RecordCount > 0 Then
response = MsgBox(“delete data pegawai ?”, 36, “information”)
If response = vbYes Then
‘textnpm = textnpm
Set Tbnim = mydbase.OpenRecordset(“select * from peg where nama = ‘” & Me.txtnama & “‘”)
If Tbnim.RecordCount > 0 Then
Tbnim.Delete
Me.txtnama.Text = “”
Me.Cmbstatus.Text = “”
Me.txtjmlanak.Text = “”
Me.Cmbjabatan.Text = “”
Me.Cmbgol.Text = “”
Me.txtkeluarga.Text = “”
Me.txtkeluarga = “”
Me.txtanak.Text = “”
Me.txtjam.Text = “”
Me.txttjlembur.Text = “”
Me.txtgapok.Text = “”
Me.txtgapok.Text = “”
Me.txtpajak.Text = “”
Me.txtpenghasilan.Text = “”
Me.txtjabatan.Text = “”
Tbnim.MoveFirst
Else
MsgBox “data tidak ada, data tidak bisa di delete”, vbCritical, “information”
End If

MsgBox “delete sukses !!”, vbInformation, “information”
Set Tbnim = mydbase.OpenRecordset(“select * from peg”)
Me.cmdinsert.Enabled = True
Me.cmdupdate.Enabled = False
Me.cmddelete.Enabled = False
Else
MsgBox ” delete tidak jadi”, vbCritical, ” informasi”
End If
Else
MsgBox “data tidak ada , tidak bisa di delete !!!”, vbCritical, “information”
Me.cmdinsert.Enabled = True
Me.cmdupdate.Enabled = False
Me.cmddelete.Enabled = False
End If
End Sub
‘Private Sub cmddelete_Click()
‘Dim nilai As Integer
‘Dim pesan As String
‘ pesan = “benar record ini akan d hapus???”
‘ nilai = MsgBox(pesan, 49, “hapus record”)
‘ If nilai = 2 Then Exit Sub

‘ Me.Data1.Recordset.Delete
‘ Me.Data1.Recordset.MoveFirst
‘End Sub

Private Sub cmdexit_Click()
End
End Sub

Private Sub cmdinsert_Click()
tanya = MsgBox(“insert…?”, vbOKCancel, ” Information”)
If tanya = vbOK Then
Call INSERT
MsgBox “insert sukses…”, vbCritical, “information”

Me.cmdinsert.Enabled = False
Me.cmddelete.Enabled = True
Me.cmdupdate.Enabled = False
Else
Exit Sub
End If
End Sub

‘Private Sub cmdinsert_Click()
‘Me.Data1.Recordset.Update
‘MsgBox “Data telah di simpan !!!”, vbInformation, “Information”
‘Me.Data1.Enabled = True
‘End Sub

Private Sub cmdproses_Click()

Dim tjlembur As Double
Dim tjanak As Double
Dim tjkeluarga As Double
Dim kel
Dim tjjabatan As Double
Dim gajipkk As Double
Dim pajak As Double
Dim totpeng As Double

‘jabatan
If Cmbjabatan = “Staff” Then
tjjabatan = ” 200000″
Me.txtlembur.Text = 10000
Me.txtjabatan.Text = tjjabatan
Else
If Cmbjabatan = “Supervisor” Then
tjjabatan = “500000”
Me.txtlembur.Text = 25000
Me.txtjabatan.Text = tjjabatan
Else
If Cmbjabatan = “Manager” Then
tjjabatan = “1000000”
Me.txtlembur.Text = 50000
Me.txtjabatan.Text = tjjabatan
End If
End If
To be continue

About these ads
 
Leave a comment

Posted by on May 4, 2011 in about me

 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: