예제 #1
0
        public int AddCustomer(string name, string surname, string email)
        {
            ICustomer newCustomer = factory.CreateCustomer(name, surname, email);
            int       custID      = customerRepository.AddCustomer(newCustomer);

            Debug.WriteLine("Customer with ID " + custID + " added to repo from facade");
            return(custID);
        }
        public int AddCustomer(string name, string surname, string email)
        {
            ICustomer newCustomer = factory.CreateCustomer(name, surname, email);
            int       custID      = customerRepository.AddCustomer(newCustomer);

            Debug.WriteLine("Customer with ID " + custID + " added to repo from facade");
            string content = "Congratulations on becoming one of our customers. We hope" +
                             "you will be satisfied with our service.";

            mailSender.SendMail(email, content);
            return(custID);
        }