Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Tuesday, July 26, 2011

VB-66 : Pay Slip of an Employee

Develop a small application to find the Gross salary and Net salary by taking the inputs BASIC,HRA,DA,CONVEYANCE and DEDUCTIONS (LIC,INCOME-TAX, LOANS, etc.)

This application calculates HRA,DA,CONVEYANCE  as follows :
15% of Basic as HRA
40% of Basic as DA
Rs.800 as the fixed conveyance for all.
Gross Salary = Basic Salary +HRA+DA+Conveyance
Net Salary = Gross Salary-(Loan+Income Tax+LIC+Others)

Refer Calculate the Gross & Net Salary of an Employee  and  Create an Employee Profile


(A)Program Design : 


(B) Property(Controls Used) :

  • 10 Labels

  • 10 Text Boxes (Name BASIC-Text1,HRA-Text2,DA-Text3...........NET SALARY-Text10 respectively)

  • One Command Button ( Calculate)



  • (C) Attaching Code to the Object :

    Private Sub Command1_Click()
    If Text1 = "" Then
    MsgBox "Basic must be specified"
    Text1.SetFocus
    Exit Sub
    End If

    If Text5 = "" Then
    Text5 = 0
    End If

    If Text6 = "" Then
    Text6 = 0
    End If

    If Text8 = "" Then
    Text8 = 0
    End If

    If Text7 = "" Then
    Text7 = 0
    End If

    Text2 = Text1 * 15 / 100
    Text3 = Text1 * 40 / 100
    Text4 = Text1 * 10 / 100
    Text9 = CSng(Text1) + CSng(Text2) + CSng(Text3) + CSng(4)
    Text10 = CSng(Text9) - CSng(Text5) - CSng(Text6) - CSng(Text7) - CSng(8)
    End Sub


        • ====================================================================
          Back to Home   &  VB
      ===========================================================

      No comments: