Exemplo n.º 1
0
 private void ValidateLastName()
 {
     isValidLastName = ValidationData.ValidateNameComplete(tbLastName.Text);
     if (isValidLastName)
     {
         tbLastName.BorderBrush = Brushes.Green;
     }
     else
     {
         tbLastName.BorderBrush      = Brushes.Red;
         imgErrorLastName.Visibility = Visibility.Visible;
     }
 }
Exemplo n.º 2
0
        private void ValidateLastName()
        {
            bool isValidLastName;

            tbLastName.BorderBrush = Brushes.Transparent;
            isValidLastName        = ValidationData.ValidateNameComplete(tbLastName.Text);
            if (isValidLastName)
            {
                tbLastName.BorderBrush = Brushes.Green;
                playerEdit.LastName    = ValidationData.DeleteSpaceWord(tbLastName.Text);
            }
            else
            {
                tbLastName.BorderBrush      = Brushes.Red;
                isValidData                 = false;
                imgErrorLastName.Visibility = Visibility.Visible;
            }
            isUpdateData = true;
        }