static void Main(string[] args) { //---------------Kullanıcı olayları-----------------// Player player1 = new Player(); player1.FirstName = "Muammer"; player1.LastName = "Sönmez"; player1.Id = 1; PlayerManager playerManager = new PlayerManager(); playerManager.Add(player1); playerManager.Delete(player1); playerManager.Update(player1); //------------------OYUN-----------------// Game game1 = new Game(); game1.GameId = 333; game1.GameName = "Pen Battle"; game1.GamePrice = 49.90; GameManager gameManager = new GameManager(); gameManager.Add(game1); gameManager.Delete(game1); gameManager.Update(game1); //----------------Kampanya------------------// Campaign campaign1 = new Campaign(); campaign1.CampaignId = 123; campaign1.CampaignName = "2 Al 1 Öde"; campaign1.CampaignDiscount = 19.99; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Delete(campaign1); campaignManager.Update(campaign1); }
static void Main(string[] args) { Gamer gamer1 = new Gamer() { Id = 1, BirthYear = 1998, FirstName = "beyza", LastName = "atar", IdentityNumber = 12345 }; UserValidationManager userValidationManager = new UserValidationManager(); GamerManager gamerManager = new GamerManager(userValidationManager); gamerManager.Add(gamer1); Order order1 = new Order() { Id = 1, GameName = "clash of royal", GamePrice = 150 }; Campaign campaign1 = new Campaign() { Id = 1, CampaignName = "yaz indirimi", Discount = 50, }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Delete(campaign1); campaignManager.Update(campaign1); OrderManager orderManager = new OrderManager(); orderManager.Addsale(order1, gamer1, campaign1); orderManager.Sale(order1, gamer1); }
static void Main(string[] args) { PlayerManager playerManager = new PlayerManager(new PlayerCheckManager()); Player player1 = new Player() { PlayerId = 4, FirstName = "Yeşim", LastName = "Doğan", BirthYear = 2000, NationalityId = 22222222222, }; playerManager.Add(player1); playerManager.Delete(player1); playerManager.Update(player1); Console.WriteLine(Environment.NewLine); Game game = new Game(); game.GameName = "League of Legends"; game.GamePrice = 120; GameManager gameManager = new GameManager(); gameManager.Add(game); gameManager.Delete(game); gameManager.Update(game); Console.WriteLine(Environment.NewLine); Campaign campaign = new Campaign { CampaignName = "Bahar İndirimi", Discount = 70 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign); campaignManager.Delete(campaign); Console.WriteLine(Environment.NewLine); SaleManager saleManager = new SaleManager(); saleManager.Sale(player1, game); saleManager.CampaignSale(player1, game, campaign); Console.WriteLine(Environment.NewLine); Console.WriteLine("Oyuncu : " + player1.FirstName + " " + player1.LastName + "\n" + "Oyun Adı ve Fiyatı: " + game.GameName + " --> " + game.GamePrice + "TL" + "\n" + "Kampanya Adı ve Uygulanacak İndirim : " + campaign.CampaignName + "-->" + campaign.Discount + "TL"); Console.ReadKey(); }