예제 #1
0
        static void NewOrReturningUser()
        {
            System.Console.WriteLine("Are you a New (n) or Returning (r) user?");
            var input = System.Console.ReadLine();

            if (input.Equals("n"))
            {
                System.Console.WriteLine("Please enter your name with no capital letters:");
                var  name = System.Console.ReadLine().ToLower();
                User user = new User(name);
                _sql.AddUser(user);
                _sql.Update();
                UserView(user);
            }
            else if (input.Equals("r"))
            {
                bool NoUser = true;
                do
                {
                    System.Console.WriteLine("please enter your name for login:"******"Invalid user name entered");
                    }
                } while (NoUser);
            }
        }