Esempio n. 1
0
        private void QtyTxt_TextChanged(object sender, EventArgs e)
        {
            string qty = QtyTxt.Text;

            if (BookRegValidation.isLetter(qty))
            {
                errorProvider1.SetError(QtyTxt, "can contain only Numbers");
                btregbk.Enabled = false;
            }
            else
            {
                errorProvider1.Clear();
                btregbk.Enabled = true;
            }
        }
Esempio n. 2
0
        private void fname_TextChanged(object sender, EventArgs e)
        {
            string fnam = fname.Text;

            if (BookRegValidation.isNumber(fnam))
            {
                errorProvider1.SetError(fname, "can contain only letters");
                RegStd.Enabled = false;
            }
            else
            {
                errorProvider1.Clear();
                RegStd.Enabled = true;
            }
        }
Esempio n. 3
0
        private void author_TextChanged(object sender, EventArgs e)
        {
            string autho = author.Text;

            if (BookRegValidation.isNumber(autho))
            {
                errorProvider1.SetError(author, "can contain only letters");
                btregbk.Enabled = false;
            }
            else
            {
                errorProvider1.Clear();
                btregbk.Enabled = true;
            }
        }
Esempio n. 4
0
        private void admisNum_TextChanged(object sender, EventArgs e)
        {
            string str = admisNum.Text;
            string let = new string(str.Take(2).ToArray());

            //   string result = new string(str.Take(5).ToArray());
            //    string let = str.Substring(0,2);
            //   string result = str.Substring(2,5);

            if (BookRegValidation.isNumber(let)) //|| BookRegValidation.isNumber(result) )
            {
                errorProvider1.SetError(admisNum, "Enter a Valid Admission Number starts with WS");
                RegStd.Enabled = false;
            }
            else
            {
                errorProvider1.Clear();
                RegStd.Enabled = true;
            }
        }