How to calculate percentage Below Percentage Text Changed Event In C#

  Protected void txtBelowPercentage_TextChanged(object sender, EventArgs e)
        {
            if (Convert.ToDecimal(txtAbovePer.Text) == 0)
            {
                decimal Amount = Convert.ToDecimal(txtEsAmount.Text ==                                    string.Empty ? "0" : txtEsAmount.Text);
                decimal abovebelow = Convert.ToDecimal(txtBelowPer.Text == string.Empty ? "0"         : txtBelowPerc.Text);
                decimal abovebelowvalue = EsAmount * (abovebelow / 100);
                decimal TenderAmount = EsAmount + abovebelowvalue;
                txtTenderAmount.Text = TenderAmount.ToString();
            }
        }

Comments

Popular posts from this blog

String Program in C#

CSV using XmlNode

Controller_Model. cs