コード例 #1
0
 public void CustomerAdd(ICustomer customer, IDatabaseDal databaseDal)
 {
     if (_customerCheckService.ValidatePerson(customer))
     {
         if (_customerCheckService.ValidateStudentOrAdult(customer))
         {
             Console.WriteLine(customer.FirstName + " saved as Student...");
         }
         else
         {
             Console.WriteLine(customer.FirstName + " saved as Adult...");
         }
         databaseDal.Add();
     }
     else
     {
         Console.WriteLine("Customer is not a valid person. Please enter valid information.");
     }
 }