Esempio n. 1
0
		private void txtAmount_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
		{
			Methods clsMethods = new Methods();
			e.Handled = clsMethods.AllNumWithDecimal(Convert.ToInt32(e.KeyChar));
		}
Esempio n. 2
0
        private void txtCreditLimit_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            Methods clsMethods = new Methods();
            e.Handled = clsMethods.AllNumWithDecimal(Convert.ToInt32(e.KeyChar));

            try
            {
                txtAvailableCredit.Text = Convert.ToString(decimal.Parse(txtCreditLimit.Text) - decimal.Parse(txtCredit.Text));
            }
            catch
            {
                txtAvailableCredit.Text = "0.00";
            }
        }