コード例 #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.");
     }
 }
コード例 #2
0
 public DatabaseManager(IDatabaseDal databaseDal)
 {
     _databaseDal = databaseDal;
 }
コード例 #3
0
 public void AddCampaign(ICampaign campaign, IGame game, ICustomer customer, IDatabaseDal databaseDal)
 {
     Console.WriteLine("Campaign: " + campaign.EntityName + " added for Game: " + game.EntityName + " for Customer: " + customer.FirstName);
     databaseDal.Add();
 }
コード例 #4
0
 public void CustomerDelete(ICustomer customer, IDatabaseDal databaseDal)
 {
     Console.WriteLine("Customer: " + customer.FirstName + " deleted...");
     databaseDal.Delete();
 }
コード例 #5
0
 public DatabaseManager(IDatabaseDal dbDal)
 {
     _dbDal = dbDal;
 }