コード例 #1
0
        private void textBoxAddEmail_TextChanged(object sender, EventArgs e)
        {
            ValidateField(EmailPattern, textBoxAddEmail);

            bool invalidExpression = _carService.ExistsCustomer(textBoxAddEmail.Text);

            buttonAddNewCustomer.Enabled     = !invalidExpression;
            labelAddCustomerDisplayInfo.Text = invalidExpression ? "Email is taken." : string.Empty;
        }
コード例 #2
0
 public bool ExistsCustomer(string email)
 {
     return(_api.ExistsCustomer(email));
 }