Buy Official Merchandise!
Forumwarz is the first "Massively Single-Player" online RPG completely built around Internet culture.

You are currently looking at Flamebate, our community forums. Players can discuss the game here, strategize, and role play as their characters.

You need to be logged in to post and to see the uncensored versions of these forums.

Log in or Learn about Forumwarz

Civil Discussion
Switch to Role-Playing Civil Discussion

Viewing a Post

Johnny Mac

Avatar: 37704 2022-12-12 08:49:44 +0000
66

[Full of SbumSS]

Level 60 Troll

I grant you an bumhole x

****ing radio bumans.

namespace CS5
{
    public partial clbum CS5Form : Form
    {
        public CS5Form()
        {
            InitializeComponent();
        }

        //Declaring clbum-level variables
        int cintEmployeeCount;
        decimal cdecTotalNetPay;

        const decimal cdecNONE_UNION_DUES = 0.00M;
        const decimal cdecREGULAR_UNION_DUES = 5.00M;
        const decimal cdecSPECIAL_UNION_DUES = 10.00M;
        const decimal cdecFEDERAL_RATE = 0.15M; //(15%)
        const decimal cdecFICA_RATE  = 0.06M; //(6%)
        const decimal cdecSTATE_RATE = 0.05M; //(5%)
   
	      
        private void btnCalculate_Click(object sender, EventArgs e)
        {
            //Declaring method variables
            int intHoursWorked;
            decimal decPayRate;
            decimal decGrossPay;
            decimal decFICATax;
            decimal decStateTax;
            decimal decFederalTax;
            decimal decNetPay;
            decimal decAverageNetPay;
            decimal decUnionDues;
            decimal decUNION_DUES;

            try
            {
                //Values input into the calculator
                intHoursWorked = int.Parse(txtHoursWorked.Text);
                decPayRate = decimal.Parse(txtPayRate.Text);
                try
                {
                    
                    //Processes to calculate various values.
                    if (intHoursWorked <= 40)
                        decGrossPay = intHoursWorked * decPayRate;
                    else
                        decGrossPay = (40 * decPayRate) + ((intHoursWorked - 40) * decPayRate * 1.5M);

                    if (rdoNone.Checked)
                        decUNION_DUES = cdecNONE_UNION_DUES;
                    else
                    if (rdoRegular.Checked)
                        decUNION_DUES = cdecREGULAR_UNION_DUES;
                    else
                    if (rdoSpecial.Checked)
                        decUNION_DUES = cdecSPECIAL_UNION_DUES;

                    decFICATax = decGrossPay * cdecFICA_RATE;
                    decFederalTax = decGrossPay * cdecFEDERAL_RATE;
                    decStateTax = decGrossPay * cdecSTATE_RATE;
                    decNetPay = decGrossPay - (decFICATax + decFederalTax + decStateTax + decUNION_DUES);
                    decUnionDues = decUNION_DUES;
                    decUNION_DUES = decUnionDues;

 
                    cdecTotalNetPay += decNetPay;
                    cintEmployeeCount += 1;
                    decAverageNetPay = cdecTotalNetPay / cintEmployeeCount;
                    


                    //Output variables to display
                    lblGrossPay.Text = decGrossPay.ToString("C"); //Displayed as currency
                    lblFICATax.Text = decFICATax.ToString("C");
                    lblFederalTax.Text = decFederalTax.ToString("C");
                    lblStateTax.Text = decStateTax.ToString("C");
                    lblUnionDues.Text = decUnionDues.ToString("C");
                    lblNetPay.Text = decNetPay.ToString("C");

                    lblTotalNetPay.Text = cdecTotalNetPay.ToString("C");
                    lblEmployeeCount.Text = cintEmployeeCount.ToString("#"); //Displayed as integer
                    lblAverageNetPay.Text = decAverageNetPay.ToString("C");
                }

                //Pay Rate errors
                catch (FormatException err)
                {
                    MessageBox.Show("Pay Rate must be numeric. " + err.Message,
                     "Data Entry Error", MessageBoxbumons.OK,
                     MessageBoxIcon.Exclamation);
                    txtPayRate.SelectAll();
                    txtPayRate.Focus();
                }
            
                }
                 
                 //Hours Worked errors
                 catch (FormatException err) 
                {  
                    MessageBox.Show("Hours worked must be numeric. " + err.Message, 
                     "Data Entry Error", MessageBoxbumons.OK, 
                     MessageBoxIcon.Exclamation); 
                    txtHoursWorked.SelectAll(); 
                    txtHoursWorked.Focus();
                } 
                   catch (Exception err)
                {
                   MessageBox.Show("Unexpected Error: " + err.Message);
                }
          
		}//end of btnCalculate


        private void btnClearForm_Click(object sender, EventArgs e)
        {
            //Clearing text boxes
            txtHoursWorked.Clear();
            txtPayRate.Clear();

            //Null string Labels
            lblGrossPay.Text = "";
            lblFICATax.Text = "";
            lblStateTax.Text = "";
            lblFederalTax.Text = "";
            lblUnionDues.Text = "";
            lblNetPay.Text = "";
            lblTotalNetPay.Text = "";
            lblEmployeeCount.Text = "";
            lblAverageNetPay.Text = "";

            //Resetting acgreat timesulators
            cdecTotalNetPay = 0;
            cintEmployeeCount = 0;

            rdoNone.Checked = true;

            txtHoursWorked.Focus();
 
        }//end of btnClearForm


        private void btnExit_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        //end of btnExit


    }//end of clbum
}//end of namespace

decUNION_DUES in

decNetPay = decGrossPay – (decFICATax + decFederalTax + decStateTax + decUNION_DUES);

is giving me a use of unbumigned local variable.

I don’t expect an answer to my problem, I just wanna cry about it.

Also give me an answer.

Internet Delay Chat
Have fun playing!
To chat with other players, you must Join Forumwarz or Log In now!