Exemple #1
0
        static void Main(string[] args)
        {
            StandardMessages.WelcomeMessage();

            Person user = PersonDataCapture.Capture();

            if (PersonValidator.ValidateUser(user) == false)
            {
                return;
            }

            AccountCreator.CreateAccount(user);
            StandardMessages.ExitProgram();
        }
Exemple #2
0
 public static bool ValidateUser(Person user)
 {
     if (string.IsNullOrWhiteSpace(user.FirstName))
     {
         StandardMessages.ValidationError("first");
         StandardMessages.ExitProgram();
         return(false);
     }
     if (string.IsNullOrWhiteSpace(user.LastName))
     {
         StandardMessages.ValidationError("last");
         StandardMessages.ExitProgram();
         return(false);
     }
     return(true);
 }