Exemplo n.º 1
0
        public string EditCustomerName()
        {
            bool   isValidName = false;
            string userName    = "";

            while (isValidName == false)
            {
                userName = io.PromptUserForString("Please enter your company name ([a-z],[0-9], and commas and periods only): ");

                if (userName == "")
                {
                    return(userName);
                }
                if (io.ValidateName(userName) == false)
                {
                    Console.WriteLine("Invalid character entered");
                }
                else
                {
                    isValidName = true;
                }
            }
            return(userName);
        }