示例#1
0
        private void TPselfassessText_TextChanged(object sender, EventArgs e)
        {
            string str = TPselfassessText.Text;

            TPselfassessText.Text = computation.commaSeparator(str);
            TPselfassessText.Select(TPselfassessText.Text.Length, 0);

            double citpaid = 0;

            citpaid = (computation.validate(TPRPPText.Text) * 0.30) - computation.validate(CITselfassesText.Text);

            if (citpaid >= 0)
            {
                CITRPPText.Text = computation.commaSeparator(citpaid.ToString());
            }
            //else
            //CITRPPText.Text = computation.commaSeparator(citpaid.ToString());


            double citpaid1 = 0;

            citpaid1 = computation.validate(TPselfassessText.Text) * 0.30;
            if (citpaid1 >= 0)
            {
                CITselfassesText.Text = computation.commaSeparator(citpaid1.ToString());
            }
            ;
            //else
            // CITselfassesText.Text = computation.commaSeparator( citpaid1.ToString());

            double citpaid2 = 0;

            citpaid2 = (computation.validate(TPTaxAudText.Text) * 0.30) -
                       (computation.validate(CITRPPText.Text) + computation.validate(CITselfassesText.Text));
            if (citpaid2 >= 0)
            {
                CITTaxAudText.Text = computation.commaSeparator(citpaid2.ToString());
            }

            if (computation.validate(TPselfassessText.Text) > computation.validate(TPTaxAudText.Text))
            {
                CITTaxAudText.Text = "";
            }
            if (computation.validate(TPselfassessText.Text) > computation.validate(TPRPPText.Text))
            {
                CITRPPText.Text = "";
            }

            //else
            // CITTaxAudText.Text = computation.commaSeparator( citpaid2.ToString());

            CashText.Text = computation.commaSeparator((computation.validate(CITselfassesText.Text) -
                                                        computation.validate(WHTText.Text)).ToString());

            /*  if (TPTaxAudText.Text == "")
             *    CITTaxAudText.Text = "0";*/
        }
示例#2
0
        private void TPselfassessText_TextChanged(object sender, EventArgs e)
        {
            string str = TPselfassessText.Text;

            TPselfassessText.Text = computation.commaSeparator(str);

            TPselfassessText.Select(TPselfassessText.Text.Length, 0);

            double citpaid = 0;

            citpaid = (computation.validate(TPRPPText.Text) * 0.020) - computation.validate(CITselfassesText.Text);

            if (citpaid >= 0)
            {
                CITRPPText.Text = computation.commaSeparator(citpaid.ToString());
            }

            // else
            //CITRPPText.Text = citpaid.ToString();


            double citpaid1 = 0;

            citpaid1 = computation.validate(TPselfassessText.Text) * 0.020;
            if (citpaid1 >= 0)
            {
                CITselfassesText.Text = computation.commaSeparator(citpaid1.ToString());
            }
            // else
            // CITselfassesText.Text = citpaid1.ToString();

            double citpaid2 = 0;

            citpaid2 = (computation.validate(TPTaxAudText.Text) * 0.020) -
                       (computation.validate(CITRPPText.Text) + computation.validate(CITselfassesText.Text));
            if (citpaid2 >= 0 && TPTaxAudText.Text != "")
            {
                CITTaxAudText.Text = computation.commaSeparator(citpaid2.ToString());
            }
            //else
            // CITTaxAudText.Text = citpaid2.ToString();
        }