Example #1
0
 private void txt_Email_TextChanged(object sender, EventArgs e)
 {
     if (!Utilities.IsValidEmail(txt_Email.Text))
     {
         lb_DangerEmail.Show(); toolTip.Show("Email is not in the right format", lb_DangerEmail);
         return;
     }
     else
     {
         toolTip.Hide(lb_DangerEmail); lb_DangerEmail.Hide();
     }
     if (_CustomerRepo.DoesEmailExists(txt_Email.Text))
     {
         lb_DangerEmail.Show(); toolTip.Show("Email already exists", lb_DangerEmail); isEmailExisting = true;
     }
     else
     {
         toolTip.Hide(lb_DangerEmail); lb_DangerEmail.Hide(); isEmailExisting = false;
     }
 }