Exemplo n.º 1
0
 private void txtEmail_Validated(object sender, EventArgs e)
 {
     if (this.txtEmail.Text != String.Empty)
     {
         if (this.ValidateEmail(this.txtEmail.Text))
         {
             if (!Crud.CheckEmailPerson(this.txtEmail.Text))
             {
                 MessageBox.Show("This email already registered.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                 this.txtEmail.Clear();
                 this.txtEmail.Focus();
             }
         }
         else
         {
             MessageBox.Show("Invalid email.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             this.txtEmail.Clear();
             this.txtEmail.Focus();
         }
     }
     else
     {
         MessageBox.Show("E-mail is empty.", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         this.txtEmail.Clear();
         this.txtEmail.Focus();
     }
 }
Exemplo n.º 2
0
 private bool?CheckPersonEmail(string email)
 {
     return(Crud.CheckEmailPerson(email));
 }