Ejemplo n.º 1
0
        private void accNoSignuptextBox_Leave(object sender, EventArgs e)
        {
            if (accNoSignuptextBox.Text == "")
            {
                accNoSignuptextBox.Text = "Account No";

                accNoSignuptextBox.ForeColor = Color.Silver;
            }

            if (accNoSignuptextBox.Text == "Account No")
            {
                AmountPaytextBox.Enabled    = false;
                SecurityNumtextBox2.Enabled = false;
            }

            if (accNoSignuptextBox.Text.Length != 16)
            {
                AccNoerrorProvidersignup.SetError(accNoSignuptextBox, "Invalid Card Number");
            }
            else
            {
                accNoValidation = 0;
                AccNoerrorProvidersignup.Clear();
            }
        }
Ejemplo n.º 2
0
        private void accNoSignuptextBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
            {
                e.Handled = true;
                AccNoerrorProvidersignup.SetError(this.accNoSignuptextBox, "Only Numerical value is valid as Account number");
            }
            else
            {
                AccNoerrorProvidersignup.Clear();
                accNoValidation = 0;
                this.Refresh();
            }

            if (accNoSignuptextBox.Text != null)
            {
                AmountPaytextBox.Enabled    = true;
                SecurityNumtextBox2.Enabled = true;
            }
        }