Sunday, October 16, 2016

Payroll System in C#

Here is a simple payroll system that I wrote using Microsoft C# programming language this payroll system is based here in the Philippine setting for the deductions like tax, philhealth, sss, pag-ibig. Our program will ask the name of the employee, position of the employee, rate per day and number of days the employee work in the company and then our program will compute the gross pay, total deductions and finally the net pay of the salary of the employee. I hope you will like my work thank you.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 

My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 


My mobile number here in the Philippines is 09173084360.




Sample Program Output


Program Listing

payroll.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

// October 16, 2016  Sunday
// Author : Mr. Jake R. Pomperada, MAED-IT
// Program to compute the salary of an employee in a company.

namespace payroll_solver
{
    class payroll
    {
        static void Main(string[] args)
        {
            string emp_name,position,reply;
            int no_days_work = 0,n=0;
            double sss = 0, philhealth = 0, tax=0,pag_ibig=0, daily_rate=0;
            double total_deductions = 0, gross_pay = 0, net_pay = 0;

            
        do {
            Console.Clear();
            Console.Write("EMPLOYEE'S PAYROLL SYSTEM");
            Console.Write("\n\n");
            Console.Write("Enter Employee's Name       : ");
            emp_name = Console.ReadLine();
            Console.Write("Enter Employee's Position   : ");
            position = Console.ReadLine();
            Console.Write("Enter Number of Day's Work  : ");
            no_days_work = Convert.ToInt32(Console.ReadLine());
            Console.Write("Enter Daily Salary Rate     : ");
            daily_rate = Convert.ToDouble(Console.ReadLine());

            gross_pay = (no_days_work * daily_rate);

            Console.Write("\n\n");
            Console.WriteLine("Gross Pay       : Php {0:0.00}.",  gross_pay);
            Console.Write("\n\n");
            Console.Write("===== DEDUCTIONS =====");
            Console.Write("\n\n");
            Console.Write("Enter SSS Contribution            : ");
            sss = Convert.ToDouble(Console.ReadLine());
            Console.Write("Enter PAG-IBIG Contribution       : ");
            pag_ibig = Convert.ToDouble(Console.ReadLine());
            Console.Write("Enter PHILHEALTH Contribution     : ");
            philhealth = Convert.ToDouble(Console.ReadLine());
            Console.Write("Enter BIR TAX Contribution        : ");
            tax = Convert.ToDouble(Console.ReadLine());

            total_deductions = (sss + pag_ibig + philhealth + tax);

            net_pay = (gross_pay - total_deductions);

            Console.Write("\n\n");
            Console.WriteLine("Total Deductions      : Php {0:0.00}.", total_deductions);
            Console.Write("\n\n");
            Console.Write("===== DISPLAY RESULTS =====");
            Console.Write("\n\n");
            Console.WriteLine("Employee's Name       : {0}.", emp_name);
            Console.WriteLine("Empoyee's  Position   : {0}.", position);
            Console.WriteLine("Gross Pay             : Php {0:0.00}.", gross_pay);
            Console.WriteLine("Total Deductions      : Php {0:0.00}.", total_deductions);
            Console.Write("\n\n");
            Console.WriteLine("Net Pay               : Php {0:0.00}.", net_pay);
            Console.Write("\n\n");
            Console.Write("Do You Want To Continue? Y/N : ");
            reply = Console.ReadLine();

            if (reply == "y" || reply == "Y")
            {
                continue;
            }
            else if (reply == "n" || reply == "N")
            {
                Console.Write("\n\n");
                Console.Write("Thank You For Using This Software.");
                Console.Write("\n\n");
                break;
            }
           
        } while (n == 0);
          Console.ReadLine();
        } 
    }
}



2 comments:

  1. Such a framework can play out the examination and dissect a worker's learning crevices versus the required information and qualities of a specific occupation. payroll management system software

    ReplyDelete
  2. Do you have an oop version of this?

    ReplyDelete