Пример #1
0
        private void CreateBadge()
        {
            Console.Clear();
            List <string> customer = new List <string>();

            Console.Write("Enter First Name:");
            var customerFirstName = Console.ReadLine();

            Console.Write("Enter Last Name:");
            var customerLastName = Console.ReadLine();

            Console.Write("Enter type of Customer: 1 - Potential, 2 - Current, 3 - Past:");
            var type = int.Parse(Console.ReadLine());

            Console.Clear();
            Console.Write("Please Confirme type of Customer: 1 - Potential, 2 - Current, 3 - Past:");
            string       yourResponse = Console.ReadLine();
            int          response     = int.Parse(yourResponse);
            GreetContent newCustomer  = new GreetContent(customerFirstName, customerLastName, (TypeofGreet)type, response);

            _greetRepo.AddGreetContentToList(newCustomer);
            if (response == 1)
            {
                Console.WriteLine("FirstName" + "  " + "  LastName " + "\tType" + "\t\t\t\tEmail");
                foreach (GreetContent content in _greetRepo.GetGreetContentList())
                {
                    Console.WriteLine($"{content.CustomerFirstName}   \t{content.CustomerLastName}  \t{content.Type} \t\t We currently have the lowest rates on Helicopter Insurance!");
                    Console.ReadLine();
                }
            }
            else if (response == 2)
            {
                Console.WriteLine("FirstName" + "  " + "  LastName " + "\tType" + "\t\t\t\tEmail");
                foreach (GreetContent content in _greetRepo.GetGreetContentList())
                {
                    Console.WriteLine($"{content.CustomerFirstName}   \t{content.CustomerLastName}  \t{content.Type} \t\t Thank you for your work with us. We appreciate your loyalty. Here's a coupon.");
                    Console.ReadLine();
                }
            }
            else if (response == 3)
            {
                Console.WriteLine("FirstName" + "  " + "  LastName " + "\tType" + "\t\t\t\tEmail");
                foreach (GreetContent content in _greetRepo.GetGreetContentList())
                {
                    Console.WriteLine($"{content.CustomerFirstName}   \t{content.CustomerLastName}  \t{content.Type} \t\t It's been a long time since we've heard from you, we want you back");
                    Console.ReadLine();
                }
            }
        }
Пример #2
0
 public void RemoveGreetContent(GreetContent content)
 {
     _newGreetContentList.Remove(content);
 }
Пример #3
0
 public void AddGreetContentToList(GreetContent content)
 {
     _newGreetContentList.Add(content);
 }