public void CustomerSearch() { Console.WriteLine("Enter your Phone Number: "); Customer foundCustomer = _customerBL.GetCustomerByName(Console.ReadLine()); if (foundCustomer == null) { Console.WriteLine("No customer with that [Phone Number] exists in our Database, register or try again."); } else { Console.WriteLine(foundCustomer.ToString()); } }
public void AddNewCustomer() { //create new customer Customer newCustomer = new Customer(); Console.WriteLine("Please enter customers name: "); newCustomer.CustomerName = Console.ReadLine(); Console.WriteLine("Please enter email: "); newCustomer.CustomerEmail = Console.ReadLine(); _customerBL.AddCustomer(newCustomer); Console.WriteLine($"New customer added! Welcome {newCustomer.CustomerName}!"); Log.Information($"New customer added. Details:{newCustomer.ToString()}"); StartShopping(_customerBL.GetCustomerByName(newCustomer.CustomerName)); }