static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new UserValidationManager()); Gamer gamer = new Gamer { Id = 1, BirthYear = 1986, FirstName = "İLHAN", LastName = "COŞKUN", TcNo = 12345678901 }; gamerManager.Add(gamer); Console.WriteLine("************************"); Campaign campaign = new Campaign(); campaign.CampaignId = 1; campaign.CampaignName = "İlk 10000 kişi"; campaign.CampaignRate = 50; Campaign campaign2 = new Campaign(); campaign2.CampaignId = 2; campaign2.CampaignName = "Yeni Yıl İndirimi"; campaign2.CampaignRate = 30; Console.WriteLine("************************"); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign); CampaignManager campaignManager2 = new CampaignManager(); campaignManager.Add(campaign2); campaignManager.Update(campaign2); Console.WriteLine("************************"); Games game = new Games { GameId = 1, GameName = "FIFA21", GamePrice = 450 }; Games game2 = new Games { GameId = 1, GameName = "Call of Duty", GamePrice = 399 }; GameManager gameManager = new GameManager(); gameManager.Add(game); GameManager gameManager2 = new GameManager(); gameManager2.Add(game2); Console.WriteLine("************************"); SalesManager salesManager = new SalesManager(); salesManager.Buy(game, gamer); salesManager.BuyWithCampaign(game2, gamer, campaign2); }
static void Main(string[] args) { IUserService userService = new UserManager(); ICampaignService campaignService = new CampaignManager(); ISalesService salesService = new SalesManager(); User person1 = new User() { Id = 1, Name = "Volkan", Surname = "Karaali", NationaltyNo = "1234567890", BirthOfDate = "1997" }; Campaign campaign1 = new Campaign() { Id = 1, Name = "Yaz İndirimi", CampaignPrice = 50 }; Game game1 = new Game() { Id = 1, Name = "CSGO", GamePrice = 20 }; campaignService.Add(campaign1); campaignService.Delete(campaign1); campaignService.Upgrade(campaign1); Console.WriteLine(""); salesService.Display(person1, campaign1, game1); Console.WriteLine(""); userService.Add(person1); userService.Delete(person1); userService.Upgrade(person1); }
static void Main(string[] args) { GameCustomer gameCustomer1 = new GameCustomer(); gameCustomer1.Id = 432547543; gameCustomer1.FirstName = "kemal"; gameCustomer1.LastName = "başaran"; gameCustomer1.Password = "******"; gameCustomer1.BuyProduct = "God of War"; gameCustomer1.ProductPrice = 320; GameCustomer gameCustomer2 = new GameCustomer(); gameCustomer2.Id = 568930857; gameCustomer2.FirstName = "arif"; gameCustomer2.LastName = "başaran"; gameCustomer2.Password = "******"; gameCustomer2.BuyProduct = "Red Dead Redemption 2"; gameCustomer2.ProductPrice = 240; GameCustomerManager gameCustomerManager = new GameCustomerManager(); Campaign campaign = new Campaign(); campaign.CampaingName = "İlk giriş kampanyası %10"; campaign.DisposableId = "45646fdsg55"; Campaign campaign2 = new Campaign(); campaign2.CampaingName = "İkincisi %50"; campaign2.DisposableId = "a46843a2sf"; Discount discount = new Discount(); discount.Çarp(gameCustomer1.ProductPrice, gameCustomer2.ProductPrice, 10, 50); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign2); campaignManager.Delete(campaign); campaignManager.Update(campaign); List <Campaign> campaigns = new List <Campaign>() { campaign, campaign2 }; ProductSalesManager productSalesManager = new ProductSalesManager(); productSalesManager.Sales(gameCustomer1, campaigns); }