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

            Person user = PersonDataCapture.Capture();

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

            AccountCreator.CreateAccount(user);
            StandardMessages.ExitProgram();
        }
Beispiel #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);
 }