public Delete ( GameProject.Campaing campaing ) : void | ||
campaing | GameProject.Campaing | |
Результат | void |
static void Main(string[] args) { Gamer gamer1 = new Gamer(); gamer1.Id = 1; gamer1.FirstName = "öznur"; gamer1.LastName = "krsy"; gamer1.NationalityId = "12345"; gamer1.DateOfBirth = 1998; Game game1 = new Game(); game1.Id = 1; game1.Name = "GTA"; game1.Price = 50; Game game2 = new Game { Id = 2, Name = "Outlast", Price = 100 }; Campaign campaign1 = new Campaign(); campaign1.Id = 10; campaign1.CampaignName = "Şubat Kampanyası"; campaign1.CampaignRate = 30; Campaign campaign2 = new Campaign { Id = 11, CampaignName = "Yeni yıl kampanyası", CampaignRate = 50 }; UserValidationManager userValidationManager = new UserValidationManager(); GamerManager gamerManager = new GamerManager(userValidationManager); gamerManager.Add(gamer1); GameManager gameManager = new GameManager(); gameManager.Add(game1); gameManager.Add(game2); gameManager.Delete(game1); gameManager.Delete(game2); gameManager.Update(game1); gameManager.Update(game2); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game2, gamer1); salesManager.CampaignSales(gamer1, game1, campaign2); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer() { GamerId = 1, BirthYear = 1986, FirstName = "Ayşe ", LastName = "Yararlı", GamerTc = 12345 }; gamerManager1.Save(gamer1); gamerManager1.Update(gamer1); gamerManager1.Delete(gamer1); GamerManager gamerManager2 = new GamerManager(new UserValidationManager()); Gamer gamer2 = new Gamer() { GamerId = 1, BirthYear = 1986, FirstName = "Fatma ", LastName = "Yararlı", GamerTc = 123456 }; gamerManager1.Save(gamer2); Game game1 = new Game() { GameId = 2, GameName = "SuDoku", Price = 650 }; Game game2 = new Game() { GameId = 3, GameName = "CandyCrush", Price = 450 }; Campaign campaign1 = new Campaign() { CampaignName = "YENİ ÜYE KAMPANYASI", DiscountRate = 30, CampaignId = 1 }; Campaign campaign2 = new Campaign() { CampaignName = "SEVGİLİLER GÜNÜ KAMPANYASI", DiscountRate = 50, CampaignId = 2 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); OrderManager orderManager = new OrderManager(); orderManager.Orders(game1, gamer2); orderManager.CampaignOrders(game2, gamer1, campaign2); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer() { Id = 1, BirthYear = 1992, FirstName = "Azize ", LastName = "Aydoğdu", IdentityNumber = 11111 }; GamerManager gamerManager2 = new GamerManager(new UserValidationManager()); Gamer gamer2 = new Gamer() { Id = 2, BirthYear = 2020, FirstName = "Ece ", LastName = "Aydoğdu", IdentityNumber = 22222 }; Game game1 = new Game() { Id = 2, GameName = "PUBG", GamePrice = 650 }; Game game2 = new Game() { Id = 3, GameName = "FORTNİTE", GamePrice = 450 }; Game game3 = new Game() { Id = 4, GameName = "GTA 5", GamePrice = 550 }; Campaign campaign1 = new Campaign() { CampaignName = "YENİ ÜYE KAMPANYASI", CampaignEndDate = 052021, CampaignId = 1 }; Campaign campaign2 = new Campaign() { CampaignName = "COVİD-19 KAMPANYASI", CampaignEndDate = 012021, CampaignId = 2 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SaleManager salesManager = new SaleManager(); salesManager.Sales(game3, gamer2); salesManager.CampaignSales(game2, gamer1, campaign2); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer() { Id = 1, BirthYear = 1999, FirstName = "Ahmet", LastName = "Özgüven", IdentityNumber = 1231231231 }; GamerManager gamerManager2 = new GamerManager(new UserValidationManager()); Gamer gamer2 = new Gamer() { Id = 2, BirthYear = 2002, FirstName = "Mehmet", LastName = "Yıldırım", IdentityNumber = 1231231232 }; Game game1 = new Game() { Id = 5, GameName = "CS GO", GamePrice = 35 }; Game game2 = new Game() { Id = 6, GameName = "ETS 2", GamePrice = 30 }; Game game3 = new Game() { Id = 7, GameName = "Battlefield 1", GamePrice = 120 }; Campaign campaign1 = new Campaign() { CampaignName = "A Kampanyası", DiscountRate = 3, NewDiscountRate = 5, CampaignId = 1 }; Campaign campaign2 = new Campaign() { CampaignName = "B Kampanyası", DiscountRate = 8, NewDiscountRate = 14, CampaignId = 2 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game2, gamer1); salesManager.CampaignSales(game3, gamer2, campaign1); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer() { Id = 1, BirthYear = 1994, FirstName = "NERİMAN", LastName = "OĞULLUK", IdentityNumber = 12345 }; GamerManager gamerManager2 = new GamerManager(new UserValidationManager()); Gamer gamer2 = new Gamer() { Id = 2, BirthYear = 2020, FirstName = "İREM", LastName = "OĞULLUK", IdentityNumber = 78940 }; Game game1 = new Game() { Id = 2, GameName = "PUBG", GamePrice = 350 }; Game game2 = new Game() { Id = 3, GameName = "MARIO", GamePrice = 50 }; Game game3 = new Game() { Id = 4, GameName = "CS-GO", GamePrice = 150 }; Campaign campaign1 = new Campaign() { CampaignName = "BAHAR KAMPANYASI", DiscountRate = 30, CampaignId = 1 }; Campaign campaign2 = new Campaign() { CampaignName = "TATİL KAMPANYASI", DiscountRate = 35, CampaignId = 2 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.UpDate(campaign1); campaignManager.UpDate(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game3, gamer2); salesManager.CampaignSales(game2, gamer1, campaign2); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer() { Id = 1, BirthYear = 1994, FirstName = "RUMEYSA ", LastName = "ÖZDEMİR", IdentityNumber = 12345 }; GamerManager gamerManager2 = new GamerManager(new UserValidationManager()); Gamer gamer2 = new Gamer() { Id = 2, BirthYear = 2020, FirstName = "ZEHRA ", LastName = "ZEYREK", IdentityNumber = 789456 }; Game game1 = new Game() { Id = 2, GameName = "PUBG", GamePrice = 650 }; Game game2 = new Game() { Id = 3, GameName = "FORTNİTE", GamePrice = 450 }; Game game3 = new Game() { Id = 4, GameName = "GTA 5", GamePrice = 550 }; Campaign campaign1 = new Campaign() { CampaignName = "YENİ ÜYE KAMPANYASI", DiscountRate = 30, CampaignId = 1 }; Campaign campaign2 = new Campaign() { CampaignName = "COVİD-19 KAMPANYASI", DiscountRate = 35, CampaignId = 2 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.UpDate(campaign1); campaignManager.UpDate(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game3, gamer2); salesManager.CampaignSales(game2, gamer1, campaign2); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new GamerCheckManager()); Gamer gamer1 = new Gamer() { GamerId = 1, BirthYear = 1998, GamerFirstName = "Burak", GamerLastName = "Yıldırım", IdentityNumber = "1234567890" }; GamerManager gamerManager2 = new GamerManager(new GamerCheckManager()); Gamer gamer2 = new Gamer() { GamerId = 2, BirthYear = 2020, GamerFirstName = "Çağrı", GamerLastName = "Akça", IdentityNumber = "0987654321" }; Game game1 = new Game() { GameId = 1, GameName = "CS:GO", GamePrice = 98 }; Game game2 = new Game() { GameId = 2, GameName = "FIFA21", GamePrice = 450 }; Game game3 = new Game() { GameId = 3, GameName = "NBA2K21", GamePrice = 300 }; Campaign campaign1 = new Campaign() { Name = "Yılbaşı ", DiscountRate = 25, Id = 1 }; Campaign campaign2 = new Campaign() { Name = "Yeni Üye ", DiscountRate = 10, Id = 2 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game2, gamer1); salesManager.CampaignSales(game3, gamer2, campaign2); }
public static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer() { Id = 1, BirthYear = 1997, FirstName = "Ertuğrul", LastName = "Sayılır", IdentityNumber = 4826 }; GamerManager gamerManager2 = new GamerManager(new UserValidationManager()); Gamer gamer2 = new Gamer() { Id = 2, BirthYear = 1999, FirstName = "Fatma", LastName = "Karabacak", IdentityNumber = 56325 }; Game game1 = new Game() { Id = 3, GameName = "Wild Rift", GamePrice = 800 }; Game game2 = new Game() { Id = 4, GameName = "CYBERPUNK", GamePrice = 1500 }; Game game3 = new Game() { Id = 5, GameName = "GTA 5", GamePrice = 750 }; Campaign campaign1 = new Campaign() { CampaignName = "YENİ YIL KAMPANYASI", DiscountRate = 20, CampaignId = 2 }; Campaign campaign2 = new Campaign() { CampaignName = "MART KAMPANYASI", DiscountRate = 30, CampaignId = 3 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game2, game1); salesManager.CampaignSales(game2, game3, campaign2); }
static void Main(string[] args) { var game = new Game() { Id = 1, Name = "CS-GO", Price = 123 }; var game2 = new Game() { Id = 12, Name = "LOL", Price = 111 }; var gamer = new Gamer() { Id = 1, FirstName = "hüseyin", LastName = "dalgıç", IdentityNumber = 12345, BirdYear = 1997 }; var gamer2 = new Gamer() { Id = 12, FirstName = "mehmet", LastName = "şimşek", IdentityNumber = 23212, BirdYear = 1994 }; var campaign = new Campaign() { Id = 1, Name = "Pazar" }; var campaign2 = new Campaign() { Id = 12, Name = "Cuma" }; var campaignManager = new CampaignManager(); campaignManager.Add(campaign); campaignManager.Delete(campaign); campaignManager.Update(campaign); campaignManager.Add(campaign2); campaignManager.Delete(campaign2); campaignManager.Update(campaign2); var gamerManager = new GamerManager(new UserValidationManager()); gamerManager.Add(gamer); gamerManager.Delete(gamer); gamerManager.Update(gamer); var orderManager = new OrderManager(new CampaignManager()); orderManager.Add(campaign); orderManager.Delete(campaign); orderManager.Update(campaign); orderManager.Add(campaign2); orderManager.Delete(campaign2); orderManager.Update(campaign2); }
static void Main(string[] args) { PlayerManager playerManager = new PlayerManager(new UserValidationManager()); Player player = new Player { Id = 1, FirstName = "EMRAH", LastName = "RAMAZAN", BirthYear = 1991, IdentityNumber = 11111111111 }; playerManager.Add(player); playerManager.Update(player); playerManager.Delete(player); GameManager gameManager = new GameManager(); Game game = new Game { Id = 1, Name = "Call Of Duty", UnitPrice = 500 }; gameManager.Add(game); gameManager.Update(game); gameManager.Delete(game); CampaignManager campaignManager = new CampaignManager(); Campaign campaign = new Campaign { Id = 1, Name = "Savaş Oyununda İndirim", Discount = 50 }; campaignManager.Add(campaign); campaignManager.Update(campaign); campaignManager.Delete(campaign); SaleManager saleManager = new SaleManager(); saleManager.Sale(player, game); saleManager.CampaignSale(player, game, campaign); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new UserValidationManager()); gamerManager.Add(new Gamer { Id = 1, FirstName = "Gamze", LastName = "Okumuş", BirthYear = 2000, IdentityNumber = 1511 }); CampaignManager campaignManager = new CampaignManager(); CampaignManager campaignManager1 = new CampaignManager(); campaignManager.Add(new Campaign() { CampaignName = "%10 İndirimli Öğrenci Kampanyası" }); campaignManager1.Update(new Campaign() { CampaignName = "%20 İndirim Kampanyası" }); campaignManager1.Delete(new Campaign() { CampaignName = "%50 İNDİRİMLİ BÜYÜK YIL SONU KAMPANYASI" }); SalesManager salesManager = new SalesManager(new CampaignManager()); salesManager.Add(new Gamer { FirstName = "Gamze " }, new Campaign { CampaignName = "%20 İndirim Kampanyasını" }); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new UserValidationManager()); Gamer gamer1 = new Gamer { Id = 1, Name = "Mine", LastName = "Aktaş", BirthYear = 1998, IdentityNumber = 12345 }; gamerManager.Add(gamer1); gamerManager.Delete(gamer1); gamerManager.Update(gamer1); Game game1 = new Game { Id = 1, Name = "Pubg", Price = 120 }; Game game2 = new Game { Id = 2, Name = "Sims 3", Price = 450 }; GameManager gameManager = new GameManager(); gameManager.Add(game1); gameManager.Add(game2); gameManager.Delete(game1); gameManager.Delete(game2); gameManager.Update(game1); gameManager.Update(game2); SalesManager sales1 = new SalesManager(); sales1.Sell(gamer1, game1); sales1.Sell(gamer1, game2); sales1.Return(gamer1, game2); Campaign campaign = new Campaign(); campaign.Id = 1; campaign.Name = "Kadınlar Günü İndirimi"; campaign.Code = 8032021; campaign.Discount = 50; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign); campaignManager.Delete(campaign); campaignManager.Update(campaign); sales1.SellWithDiscount(gamer1, game1, campaign); }
static void Main(string[] args) { //Oyuncu Oluşturma Gamer gamer1 = new Gamer(); gamer1.Id = 1; gamer1.FirstName = "Tuğba"; gamer1.LastName = "Öksüm"; gamer1.NationalityId = 12345678911; gamer1.BirthYear = 1999; //Oyuncu Ekleme GamerManager gamerManager1 = new GamerManager(new MernisServiceAdapter()); gamerManager1.Add(gamer1); //Oyuncu Silme gamerManager1.Delete(gamer1); //Oyuncu Güncelleme gamerManager1.Update(gamer1); //Oyun Oluşturma Game game1 = new Game(); game1.GameId = 1; game1.GameName = "tugba's game"; game1.GamePrice = 1500; //Oyun Ekleme GameManager gameManager1 = new GameManager(); gameManager1.Add(game1); //Oyun Silme gameManager1.Delete(game1); //Oyun Güncelleme gameManager1.Update(game1); //Kampanya Oluşturma Campaign campaign1 = new Campaign(); campaign1.CampaignId = 1; campaign1.CampaignName = "thirty percent discount"; campaign1.DiscountRate = 30; //Kampanya Ekleme CampaignManager campaignManager1 = new CampaignManager(); campaignManager1.Add(campaign1); //Kampanya Silme campaignManager1.Delete(campaign1); //Kampanya Güncelleme campaignManager1.Update(campaign1); //Satış SalesManager salesManager = new SalesManager(); //Normal Satış salesManager.Sales(game1, gamer1); //Kampanyalı Satış salesManager.CampaignSales(game1, gamer1, campaign1); }
static void Main(string[] args) { //Oyuncu Oluşturma Gamer gamer1 = new Gamer(); gamer1.Id = 1; gamer1.FirstName = "Yiğit"; gamer1.LastName = "Nebioğlu"; gamer1.NationalityId = 18899276482; gamer1.BirthYear = 1995; //Oyuncu Ekleme (Add) GamerManager gamerManager1 = new GamerManager(new MernisServiceAdapter()); gamerManager1.Add(gamer1); //Oyuncu Silme (Delete) gamerManager1.Delete(gamer1); //Oyuncu Güncelleme (Update) gamerManager1.Update(gamer1); //Oyun Oluşturma Game game1 = new Game(); game1.GameId = 1; game1.GameName = "Game 1"; game1.GamePrice = 100; //Oyun Ekleme GameManager gameManager1 = new GameManager(); gameManager1.Add(game1); //Oyun Silme gameManager1.Delete(game1); //Oyun Güncelleme gameManager1.Update(game1); //Kampanya Oluşturma Campaign campaign1 = new Campaign(); campaign1.CampaignId = 1; campaign1.CampaignName = "Discount 10"; campaign1.DiscountRate = 10; //Kampanya Ekleme CampaignManager campaignManager1 = new CampaignManager(); campaignManager1.Add(campaign1); //Kampanya Silme campaignManager1.Delete(campaign1); //Kampanya Güncelleme campaignManager1.Update(campaign1); //Satış SalesManager salesManager = new SalesManager(); //Normal Satış salesManager.Sales(game1, gamer1); //Kampanyalı Satış salesManager.CampaignSales(game1, gamer1, campaign1); }
static void Main(string[] args) { Console.WriteLine("GameProject by Armağan Bice 1.2.2021"); IUserValidationService userValidationService = new MernisUserValidationManager(); Console.WriteLine("Select User Validation Service"); GamerManager gamerManager = new GamerManager(userValidationService); Console.WriteLine("Defined Gamer Manager with select User.Val.Service"); Gamer gamer1 = new Gamer(); gamer1.SurName = "Armağan"; gamer1.LastName = "Bice"; gamer1.DateofBirth = DateTime.Now; gamer1.TcNo = "12345678901"; gamerManager.Add(gamer1); gamerManager.Update(gamer1); gamerManager.Delete(gamer1); CampaignManager campaignManager = new CampaignManager(); Campaign campaign1 = new Campaign(); campaign1.CampaignId = 1; campaignManager.Add(campaign1); campaignManager.Update(campaign1); campaignManager.Delete(campaign1); OrderManager orderManager = new OrderManager(); Order order1 = new Order(); order1.CampaignId = campaign1.CampaignId; Console.WriteLine("Setting Order CampaignId=" + order1.CampaignId); orderManager.Add(gamer1, order1); orderManager.Delete(order1); orderManager.Update(order1); Console.ReadLine(); }
static void Main(string[] args) { IPersonDol playerManager = new PlayerManager(); Player player = new Player() { Id = 1, BirthYear = 2001, FirstName = "Fatih", LastName = "Çayır", TC = 1235 }; Game game = new Game() { Id = 1, Name = "CS:GO", UnitPrice = 10 }; UserValidationManager userValidation = new UserValidationManager(); if (userValidation.Validate(player) == true) { playerManager.Add(player); } else { Console.WriteLine("Doğrulama başarısız"); } SellingManager selling = new SellingManager(); selling.Sell(); CampaignManager campaign = new CampaignManager(); campaign.EndOfYearCampaign(player, game); campaign.Delete(); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new MernisServiceAdapter()); Gamer gamer = new Gamer { Id = 1, FirstName = "Esra", LastName = "Özdoğan", BirthYear = new DateTime(1998, 09, 15), IdentityNumber = 12345687890 }; gamerManager.Add(gamer); gamerManager.Update(gamer); gamerManager.Delete(gamer); GameManager gameManager = new GameManager(); Game game = new Game { Id = 1, Name = "Game Name123", UnitPrice = 120 }; gameManager.Add(game); gameManager.Update(game); gameManager.Delete(game); CampaignManager campaignManager = new CampaignManager(); Campaign campaign = new Campaign { CampaignId = 1, CampaignName = "Discount on game", CampaignDiscount = 25 }; campaignManager.Add(campaign); campaignManager.Update(campaign); campaignManager.Delete(campaign); SaleManager saleManager = new SaleManager(); saleManager.Sale(gamer, game); saleManager.CampaignSale(gamer, game, campaign); /*GamerManager gamerManager = new GamerManager(new UserValidationManager()); * gamerManager.Add(new Gamer * { * Id = 1, * BirthYear = 1984, * FirstName = "ENGİN", * LastName = "DEMİROĞ", * IdentityNumber = 12345 * }); * * //Yeni bir e devlet sistemi yapısna geçilirse NewEStateUserValidationManager * GamerManager gamerManager1 = new GamerManager(new NewEStateUserValidationManager()); * gamerManager.Add(new Gamer * { * Id = 1, * BirthYear = 1984, * FirstName = "ENGİN", * LastName = "DEMİROĞ", * IdentityNumber = 12345 * * });*/ Console.WriteLine("Hello World!"); }
static void Main(string[] args) { Gamer gamer1 = new Gamer { Id = 1, TcNum = "111111111", FirstName = "İrem", LastName = "Altnz", BirtYear = 2001 }; Gamer gamer2 = new Gamer { Id = 2, TcNum = "222222222", FirstName = "Nusret", LastName = "Altnz", BirtYear = 1965 }; GamerManager gamerManager = new GamerManager(); gamerManager.Add(gamer1); gamerManager.Add(gamer2); gamerManager.List(); Game game1 = new Game { Id = 1, Name = "LEAGUE OF LEGENDS", Price = 100, SystemRequirements = "Onerilen Sistem Gereksinimleri : Core 2 Duo E6850 3.0GHz işlemci , 4 GB RAM " }; Game game2 = new Game { Id = 2, Name = "PUBG", Price = 50, SystemRequirements = "Onerilen Sistem Gereksinimleri : Core i5-6400 2.7GHz işlemci , 8 GB RAM" }; GameManager gameManager = new GameManager(); gameManager.Add(game1); gameManager.Add(game2); gameManager.List(); Campaign campaign1 = new Campaign { Id = 1, Name = "Yeni Yil Kampanyası", CampaignRate = 50 }; Campaign campaign2 = new Campaign { Id = 2, Name = "Black Friday Kampanyasi", CampaignRate = 60 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.List(); SalesManager salesManager = new SalesManager(); salesManager.Sales(game1, gamer1); salesManager.Sales(game2, gamer1, campaign1); salesManager.Sales(game1, gamer2, campaign2); gamer2.FirstName = "Ayca"; gamerManager.Update(gamer2); gamerManager.Delete(gamer1); game2.Price = 200; gameManager.Update(game2); gameManager.Delete(game1); campaign1.CampaignRate = 70; campaignManager.Update(campaign1); campaignManager.Delete(campaign2); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new NewEStateValidationManager()); SalesManager salesManager = new SalesManager(); CampaignManager campaignManager = new CampaignManager(); Gamer gamer = new Gamer() { Id = 1, BirthYear = 1986, FirstName = "Bestami", LastName = "TAYFUROĞLU", IdentityNumber = 123456 }; Gamer gamer2 = new Gamer() { Id = 2, BirthYear = 1991, FirstName = "Mehmet", LastName = "Çakmak", IdentityNumber = 987456 }; Sales sales1 = new Sales(); sales1.SalesId = 1; sales1.GameName = "PUBG"; sales1.Price = 149.90; Sales sales2 = new Sales(); sales2.SalesId = 2; sales2.GameName = "GOT:Conquest"; sales2.Price = 399.99; Campaign campaign1 = new Campaign(); campaign1.CampaignName = "Yeni yıl kampanyası "; campaign1.CampaignPercent = 50; gamerManager.Delete(gamer); gamerManager.Update(gamer); Console.WriteLine(" "); salesManager.Sales(sales2, gamer); salesManager.Sales(sales1, gamer2); Console.WriteLine(" "); campaignManager.Add(campaign1, gamer, sales2); Console.WriteLine(" "); campaignManager.Add(campaign1, gamer2, sales1); Console.WriteLine(" "); campaignManager.Delete(campaign1, gamer2, sales1); campaignManager.Update(campaign1, gamer2, sales2); }
static void Main(string[] args) { IEntityService entityService = new PlayerManager(); entityService.Add(new Player() { Id = 1, PlayerName = "Ayşenur", PlayerSurname = "Tunç", BirthDate = 1998, NationalityId = "12345678910" }); entityService.Add(new Player() { Id = 2, PlayerName = "Dilara", PlayerSurname = "Ünsal", BirthDate = 1995, NationalityId = "12345678912" }); IGameManager gameManager = new GameManager(); gameManager.Add(new Game() { GameId = 1, GameName = "League of Legends", GamePrice = 500, GameType = "MOBA" }); gameManager.Add(new Game() { GameId = 2, GameName = "Witcher", GamePrice = 200, GameType = "RPG" }); gameManager.Delete(new Game() { GameName = "League of Legends" }); gameManager.SalesGame(new Game() { GameName = "League of Legends" }, new Player() { PlayerName = "Ayşenur" }); ICampaign campaign = new CampaignManager(); campaign.Add(new Campaign() { Id = 1, Name = "Kara Cuma İndirimi", DiscountRate = "%50" }); campaign.Add(new Campaign() { Id = 2, Name = "Öğrenci İndirimi", DiscountRate = "%65" }); campaign.Delete(new Campaign() { Id = 2, Name = "Öğrenci İndirimi", DiscountRate = "%65" }); campaign.CalculateDiscount(new Campaign() { Id = 1, Name = "Kara Cuma İndirimi", DiscountRate = "%50" }); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new NewEStateUserValidationManager()); SaleManager saleManager = new SaleManager(); CampaignManager campaignManager = new CampaignManager(); gamerManager.Add(new Gamer { Id = 1, FirstName = "Gülzade", LastName = "Odabaş", BirthYear = 1996, IdentityNumber = 123456 }); Gamer gamer2 = new Gamer(); gamer2.Id = 2; gamer2.FirstName = "Ali"; gamer2.LastName = "Karaca"; gamer2.BirthYear = 1985; gamer2.IdentityNumber = 123456789; Sale sale1 = new Sale(); sale1.SaleId = 1; sale1.GameName = "Sims"; sale1.Price = 29.99; Sale sale2 = new Sale(); sale2.SaleId = 2; sale2.GameName = "PUBG"; sale2.Price = 49.99; Campaign campaign1 = new Campaign(); campaign1.CampaignId = 1; campaign1.CampanignName = "Yıl sonu indirimi"; campaign1.CampaignPercent = 50; gamerManager.Delete(gamer2); gamerManager.Update(gamer2); Console.WriteLine("------Satış-------"); saleManager.Sale(sale2, gamer2); saleManager.Sale(sale1, gamer2); Console.WriteLine("----Kampanya-------"); campaignManager.Add(campaign1, sale1); campaignManager.Add(campaign1, sale2); campaignManager.Delete(campaign1, sale2); campaignManager.Update(campaign1, sale1); }
static void Main(string[] args) { Customer customer1 = new Customer(); customer1.Id = 1; customer1.FirstName = "Ayşe"; customer1.LastName = "Kaya"; customer1.NationalityId = "12456890532"; customer1.DateOfBirth = new DateTime(1994, 2, 3); Customer customer2 = new Customer(); customer2.Id = 1; customer2.FirstName = "Ali"; customer2.LastName = "Emin"; customer2.NationalityId = "19853656572"; customer2.DateOfBirth = new DateTime(1988, 7, 3); Campaign campaign1 = new Campaign() { Id = 12, CampaignName = "Kampanya1", CampaignRate = 25 }; Campaign campaign2 = new Campaign() { Id = 22, CampaignName = "Kampanya2", CampaignRate = 10 }; Games games1 = new Games() { Id = 1, GameName = "Oyun1", Price = 100 }; Games games2 = new Games() { Id = 2, GameName = "Oyun2", Price = 200 }; Games games3 = new Games() { Id = 3, GameName = "Oyun3", Price = 300 }; CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Delete(customer2); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Delete(campaign2); GameSaleManager gameSaleManager = new GameSaleManager(); gameSaleManager.Sale(customer1, games1, campaign1); }
static void Main(string[] args) { GamerManager gamerManager1 = new GamerManager(new UserValidatinoManager()); Gamer gamer1 = new Gamer { Id = 1, BirthYear = 1996, FirstName = "Gamze", LastName = "Aydın", IdentityNumber = 12356 }; GamerManager gamerManager2 = new GamerManager(new UserValidatinoManager()); Gamer gamer2 = new Gamer { Id = 2, BirthYear = 2004, FirstName = "Cemre", LastName = "Aydın", IdentityNumber = 12796 }; Game game1 = new Game { GameId = 1, GameName = " PUBG", GamePrice = 125 }; Game game2 = new Game { GameId = 2, GameName = " COUNTER STRİKE", GamePrice = 350 }; Game game3 = new Game { GameId = 3, GameName = " NEED FOR SPEED", GamePrice = 150 }; Campaign campaign1 = new Campaign { CampaignId = 1, CampaignName = " Yeni Üye Kampanyası", DiscountRate = 50 }; Campaign campaign2 = new Campaign { CampaignId = 2, CampaignName = " Yeni Yıl Kampanyası", DiscountRate = 35 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Add(campaign2); campaignManager.Update(campaign1); campaignManager.Update(campaign2); campaignManager.Delete(campaign1); campaignManager.Delete(campaign2); SalesManager salesManager = new SalesManager(); salesManager.Sales(game3, gamer1); salesManager.CampaignSales(game2, gamer2, campaign2); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new UserValidationManager()); gamerManager.Add(new Gamer { Id = 01, FirstName = "Taha", LastName = "Ağaoğlu", BirtYear = "01.01.1999", IndentityNumber = 111 }); GameSellerManager gameSellerManager = new GameSellerManager(); Game game = new Game(); game.GameName = "Pes21"; game.Price = 100; gameSellerManager.Seller(new Gamer { Id = 02, FirstName = "Cengiz", LastName = "Karakelle", BirtYear = "02.02.2000", IndentityNumber = 222 }, game); Game game2 = new Game(); game.GameName = "Fifa21"; game.Price = 200; gameSellerManager.Seller(new Gamer { Id = 03, FirstName = "Fatih", LastName = "Karakelle", BirtYear = "02.02.2000", IndentityNumber = 222 }, game); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(new Campaign { Id = 01, CampaignName = "Summer Sale", Discount = 25 }, game); Campaign campaign2 = new Campaign { Id = 02, CampaignName = "Winter Sale", Discount = 30 }; campaignManager.Add(campaign2, game2); campaignManager.Delete(campaign2); }
private static void CampaignTest() { CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(new Campaign { CampaignId = 1, CampaignName = "Gaming Fest", DiscountRate = 20 }); campaignManager.Update(new Campaign { CampaignId = 1, CampaignName = "Gaming Festival", DiscountRate = 40 }); campaignManager.Delete(new Campaign { CampaignId = 1 }); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new NewEStateUserValidationManager()); gamerManager.Add(new Gamer { Id = 1, BirthYear = 1984, FirstName = "NEZİR ALP", LastName = "ARSLAN", IdentityNumber = 12345 }); CampaignManager campaignManager = new CampaignManager(); campaignManager.Delete(new Gamer()); }
static void Main(string[] args) { User user1 = new User(); user1.UserId = 1; user1.UserFirstName = "Betülay"; user1.UserLastName = "Namver"; user1.DateOfBirth = new DateTime(2000, 9, 21); user1.NationalityId = "12345678900"; User user2 = new User { UserId = 2, UserFirstName = "Can", UserLastName = "Yüksel", NationalityId = "12456930785", DateOfBirth = new DateTime(1993, 2, 16) }; User user3 = new User { UserId = 3, UserFirstName = "Mehmet", UserLastName = "Namver", NationalityId = "12348450785", DateOfBirth = new DateTime(1998, 9, 21) }; UserManager userManager = new UserManager(); userManager.Add(user3); userManager.Delete(user2); userManager.Update(user1); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(new Campaign { CampaignId = 101, CampaignName = "Harika Fırsat", DiscountRate = 30 }); campaignManager.Delete(new Campaign { CampaignId = 101, CampaignName = "Harika Fırsat", DiscountRate = 30 }); campaignManager.Update(new Campaign { CampaignId = 101, CampaignName = "Harika Fırsat", DiscountRate = 30 }); SalesManager salesManager = new SalesManager(); salesManager.Sales(new Game { GameId = 1, GameName = "Sims", GamePrice = 180 }, new User { UserId = 4, UserFirstName = "İlayda", UserLastName = "Saraç", DateOfBirth = new DateTime(2000, 8, 4), NationalityId = "13658742964" }, new Campaign { CampaignId = 101, CampaignName = "Harika Fırsat", DiscountRate = 30 }); }
static void Main(string[] args) { CampaignManager campaignManager = new CampaignManager(); Campaign campaign1 = new Campaign() { CampaignId = 1, CampaignName = "Fırsat20", Discount = 20 }; Campaign campaign2 = new Campaign() { CampaignId = 1, CampaignName = "Fırsat50", Discount = 50 }; campaignManager.Add(campaign1); campaignManager.Delete(campaign2); campaignManager.List(); campaignManager.Update(campaign1); Gamer gamer = new Gamer() { NationalityId = 11111111111, GamerId = 1, FirstName = "Fatma Gül", LastName = "Yıldırım", Age = 19, UserName = "******", Mail = "*****@*****.**", Password = "******", BirthDate = new DateTime(2001, 11, 13) }; SteamGamerManager steamGamerManager = new SteamGamerManager(new EDevletServiceAdaptor()); steamGamerManager.Add(gamer); Game game1 = new Game() { GameId = 1, GameName = "Counter Strike-Global Offensive", Kind = "FPS", GamePrice = 100 }; IOrderService orderManager = new OrderManager(); orderManager.Order(gamer, game1); orderManager.OrderWithCampaign(gamer, game1, campaign1); }
static void Main(string[] args) { GamerManager gamerManager = new GamerManager(new GamerCheckManager()); Gamer gamer1 = new Gamer { Id = 1, FirstName = "İREM", LastName = "DİLİK", BirthYear = 2001, IdentityNumber = 12345678910 }; gamerManager.Add(gamer1); gamerManager.Update(gamer1); gamerManager.Delete(gamer1); GameManager gameManager = new GameManager(); Game game1 = new Game { Name = "LOL", Price = 50 }; gameManager.Add(game1); gameManager.Update(game1); gameManager.Delete(game1); CampaignManager campaignManager = new CampaignManager(); Campaign campaign1 = new Campaign { Name = "Kış İndirimi", Percentage = 25 }; campaignManager.Add(campaign1); campaignManager.Delete(campaign1); campaignManager.Update(campaign1); SaleManager saleManager = new SaleManager(); saleManager.CampaignSale(gamer1, game1, campaign1); saleManager.GameSale(gamer1, game1); }
static void Main(string[] args) { Game game1 = new Game(); game1.Id = 1; game1.GameName = "Total War"; game1.GameType = "Strateji"; Gamer gamer = new Gamer(); gamer.Id = 1; gamer.FirstName = "AYDIN"; gamer.LastName = "TUZ"; gamer.IdentityNumber = 11111111111; gamer.BirthYear = 1986; GamerManager gamerManager = new GamerManager(new UserValidationManager()); gamerManager.Add(gamer); Campaign campaign1 = new Campaign(); campaign1.CampaignId = 1; campaign1.CampaignName = "Sevgililer Günü Özel"; campaign1.DiscountRate = 0.25; campaign1.StartDate = new DateTime(2021, 2, 14); campaign1.EndDate = new DateTime(2021, 2, 17); CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign1); campaignManager.Update(campaign1); campaignManager.Delete(campaign1); SaleManager saleManager = new SaleManager(campaign1); saleManager.Sale(game1, gamer); }