static void Main(string[] args) { PlayerManager playerManager = new PlayerManager(new UserValidationManager()); playerManager.Add(new Player { Id = 1, BirthYear = 1998, //BirthYear=1997 --> kayit basarisiz FirstName = "Berkcan", LastName = "Tezcaner", IdentityNumber = "12345" }); //hatalı giris playerManager.Add(new Player { Id = 1, BirthYear = 1998, FirstName = "Berk", LastName = "Tezcaner", IdentityNumber = "12345" }); Campaign campaign1 = new Campaign { CampaignName = "Yeni Yıl İndirimi", Id = 1, SalePercent = 25 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Delete(campaign1); campaignManager.Update(campaign1); Console.WriteLine("--"); Order order1 = new Order { Id = 1, Price = 100 }; Order order2 = new Order { Id = 1, Price = 200 }; OrderManager orderManager = new OrderManager(); orderManager.Sell(order1); Console.WriteLine("--"); orderManager.Sell(campaign1, order2); }
static void Main(string[] args) { Customer customer1 = new Customer() { FirstName = "İdil", LastName = "Erkal", YearofBirth = 1999, IdentityNumber = 123 }; Customer customer2 = new Customer() { FirstName = "İrem", LastName = "Erkal", YearofBirth = 1991, IdentityNumber = 124 }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Add(customer2); customerManager.Delete(customer2); customerManager.Update(customer1); customerManager.Update(customer2); Campaign campaign1 = new Campaign() { CampaignName = "Campaign1", DiscountRate = 50 }; Campaign campaign2 = new Campaign() { CampaignName = "Campaign2", DiscountRate = 70 }; CampaignManager campaignManager = new CampaignManager(); { campaignManager.Add(campaign1); campaignManager.Delete(campaign1); campaignManager.Add(campaign2); campaignManager.Delete(campaign2); } SaleManager saleManager = new SaleManager(); { saleManager.Add(new Entities.Sale { GameName = "VALORANT", GamePrice = 500 }, customer1, campaign1); saleManager.Add(new Entities.Sale { GameName = "lol", GamePrice = 600 }, customer2, campaign2); } }