示例#1
0
        static void Main(string[] args)
        {
            GamerManager gamerManager1 = new GamerManager(new GamerCheckService());
            Gamer        gamer1        = new Gamer()
            {
                Id = 1, FirstName = "Berna", LastName = "Bayuk", DateOfBirth = new DateTime(1995, 5, 17), NationalityId = "12345678910"
            };

            Game game1 = new Game()
            {
                Id = 1, Name = "PUBG", Price = 600
            };
            Game game2 = new Game()
            {
                Id = 2, Name = "GTA 5", Price = 500
            };

            Campaign campaign1 = new Campaign()
            {
                Id = 1, Name = "Yeni Üye Kampanyası", DiscountRate = 10
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(game1, gamer1);
            salesManager.CampaignSales(game2, gamer1, campaign1);
        }
示例#2
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                BirthYear = 1999, FirstName = "Berke", LastName = "Özden", ID = 1, IdendityNumber = 123123
            });

            Sale saleGame = new Sale {
                Id = 1, GameName = " Fifa21", GamePrice = 350
            };
            Sale saleGame2 = new Sale {
                Id = 2, GameName = " NBA 2K 2021", GamePrice = 210
            };

            Campaign campaign = new Campaign {
                ID = 1, CampaignName = "Herkese Ucuz Oyun", CampaignDetail = "%50 indirim"
            };
            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign);

            if (campaign.ID == 1)
            {
                ICampaignService campaignService = new DiscountCampaignManager();
                campaignService.Apply(campaign, saleGame);
                campaignService.Apply(campaign, saleGame2);
            }
            else
            {
                SalesManager saleManager = new SalesManager();
                saleManager.Buy(saleGame);
            }
        }
示例#3
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = 1997,
                FirstName      = "RANA",
                LastName       = "KARATOPRAK",
                IdentityNumber = 1234567890
            });

            GameManager gameManager = new GameManager();

            gameManager.Add(new Game {
                GameName = "PUBG", GamePrice = 10.0, Id = 1
            });

            SalesManager salesManager = new SalesManager();

            salesManager.CampaignAdd(new Campaign {
                CampaignName = "İlkbahar Kampanyası", Id = 1
            });
            salesManager.Sell(new Gamer {
                FirstName = "RANA"
            }, new Game {
                GameName = "PUBG"
            });
        }
示例#4
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = 1989,
                FirstName      = "Emre",
                LastName       = "Pelvan",
                IdentityNumber = 22445656420
            });

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(new Campaign
            {
                Id               = 1,
                CampaignName     = "Mart indirimleri başladı.",
                CampaignDuration = "01/03/2021",
                DiscountRate     = 50
            });

            SalesManager salesManager = new SalesManager(new CampaignManager());

            salesManager.CampaignSales(new Sales
            {
                Id       = 1,
                GameName = "Counter Strike:GO",
                Price    = 50
            });
        }
示例#5
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1, BirthYear = 1998,
                FirstName      = "Salih",
                LastName       = "Kamaş",
                IdentityNumber = 11111111111
            });
            CampaignManager campaign = new CampaignManager();

            campaign.Add(new Campaign {
                Id = 1, CampaignName = "Halloween Campaign", Discount = 75
            });
            SalesManager sales = new SalesManager();

            sales.Sell(new Gamer {
                Id             = 1,
                BirthYear      = 1998,
                FirstName      = "Salih",
                LastName       = "Kamaş",
                IdentityNumber = 11111111111
            }, new Sales {
                Id = 1, Price = 100, Quantity = 2
            }, new Campaign {
                Id           = 1,
                CampaignName = "Halloween Campaign",
                Discount     = 75
            });
        }
示例#6
0
        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);
        }
示例#7
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer        = new Gamer
            {
                GamerId        = 1,
                DateOfBirth    = new DateTime(1992, 02, 14),
                FirstName      = "Yahya",
                LastName       = "ERDOĞAN",
                IdentityNumber = 9876
            };

            gamerManager.Add(gamer);

            CampaignRateManager campaignRateManager = new CampaignRateManager();
            Campaign            campaign            = new Campaign {
                CampaingId = 1, CampaingName = "Eğlenceli %25 İndirim", DiscountRate = 0.25M
            };

            campaignRateManager.Add(campaign);

            GameManager gameManager = new GameManager();
            Game        game        = new Game {
                GameId = 1, GameName = "Minecraft", GamePrice = 145
            };

            gameManager.Add(game);


            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer, game);
            salesManager.CampaignSales(game, gamer, campaign);
        }
示例#8
0
文件: Program.cs 项目: Sevdenur/Kamp
        static void Main(string[] args)
        {
            IGamerService gamerManager = new GamerManager(new UserValidationManager());
            Gamer         gamer        = new Gamer
            {
                Id             = 1,
                BirthYear      = 1996,
                FirstName      = "SEVDENUR",
                LastName       = "DEMİREL",
                IdentityNumber = 12345
            };

            gamerManager.Add(gamer);

            IGameService gameManager = new GameManager();
            Game         game        = new Game {
                GameName = "League of Legends",
                Price    = 50
            };

            gameManager.Add(game);

            ICampainService campainManager = new CampainManager();
            Campain         campain        = new Campain {
                CampainName = "",
                Discount    = 0
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Sell(gamer, game, campain);

            Console.ReadLine();
        }
示例#9
0
        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);
        }
示例#10
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id             = 2;
            gamer1.FirstName      = "HASAN";
            gamer1.LastName       = "DOĞRU";
            gamer1.BirthDay       = 1987;
            gamer1.IdentityNumber = 9865475;

            GamerManager gamerManager = new GamerManager(new UserValidateManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthDay = 1990, FirstName = "RIDVAN", LastName = "BOZKIR", IdentityNumber = 123654987
            });
            gamerManager.Update(gamer1);
            gamerManager.Delete(gamer1);

            SalesManager salesManager = new SalesManager();

            salesManager.Buy(gamer1);

            Sales sales = new Sales();

            sales.Id           = 1;
            sales.GamerId      = 2;
            sales.Number       = 54874;
            sales.SalesDetails = "Bilgisayar satışı";

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(sales);
        }
示例#11
0
        static void Main(string[] args)
        {
            Console.WriteLine("GAMES");
            Game game1 = new Game()
            {
                GameID = 1, Name = "League of Legends", Price = 200
            };
            Game game2 = new Game()
            {
                GameID = 2, Name = "PUBG", Price = 300
            };
            Game game3 = new Game()
            {
                GameID = 3, Name = "Counter-Strike: Global Offensive", Price = 450
            };

            GameManager gameManager = new GameManager();

            gameManager.Add(game1);
            gameManager.Update(game2);
            gameManager.Remove(game3);

            Console.WriteLine("");
            Console.WriteLine("GAMERS");

            Gamer gamer = new Gamer()
            {
                GamerID = 1, Identity = "11111", Name = "Ayşe", Surname = "Akışık", BirthYear = 1999
            };

            GamerManager gamerManager = new GamerManager(new AuthenticationManager());

            gamerManager.Add(gamer);

            Console.WriteLine("");
            Console.WriteLine("CAMPAIGNS");

            Campaign campaign1 = new Campaign()
            {
                CampaignID = 1, Name = "Campaign1"
            };
            Campaign campaign2 = new Campaign()
            {
                CampaignID = 2, Name = "Campaign2"
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
            campaignManager.Update(campaign1);
            campaignManager.Remove(campaign1);

            Console.WriteLine("");
            Console.WriteLine("SALES");

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer, game1);
            salesManager.CampaignSales(gamer, game2, campaign2);
        }
示例#12
0
        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ı"
            });
        }
示例#13
0
        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);
        }
示例#14
0
        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);
        }
示例#15
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer
            {
                IdentityNumber = 11111111111,
                FirstName      = "Gökhan",
                LastName       = "Karakuş",
                BirthYear      = 1111
            };
            Game game = new Game
            {
                GameName  = "Snake",
                GamePrice = 99
            };
            Campaign campaign = new Campaign
            {
                CampaignName      = "3 al 1 öde",
                CapmpaignDiscount = 0.70
            };
            GamerManager gamerManager = new GamerManager(new MernisServiceAdapter());

            gamerManager.Add(gamer);
            SalesManager salesManager = new SalesManager();

            salesManager.Add(gamer, game, campaign);
        }
示例#16
0
        static void Main(string[] args)
        {
            Player player = new Player
            {
                FirstName   = "Nurettin",
                LastName    = "Ayıpettin",
                NationalId  = 85941736744,
                YearOfBirth = 1881,
                Nickname    = "CokPisOynarım_5334"
            };
            Game game = new Game {
                NameOfGame = "Call of Duty", Price = 1000
            };

            SpecialOffer specialOffer = new SpecialOffer {
                NameOfOffer = "Super Discount", DiscountPercent = 20
            };

            PlayerAccountManager playerAccountManager = new PlayerAccountManager(new PlayerCheckManager());

            playerAccountManager.SignUp(player);
            Console.WriteLine("----");

            SalesManager salesManager = new SalesManager();

            salesManager.SellGame(player, game);
            Console.WriteLine("----");


            SpecialOfferManager specialOfferManager = new SpecialOfferManager();

            specialOfferManager.AddOffer(specialOffer, game);
            Console.WriteLine("----");
            salesManager.DiscountSale(specialOffer, game);
        }
示例#17
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer()
            {
                Id = 1, FirstName = "Ayhan", LastName = "Ata", BirthDate = new DateTime(1981, 1, 1), IdentityId = "11111111111"
            };
            Customer customer2 = new Customer()
            {
                Id = 2, FirstName = "Veli", LastName = "Demirel", BirthDate = new DateTime(1982, 1, 1), IdentityId = "22222222222"
            };
            Customer customer3 = new Customer()
            {
                Id = 3, FirstName = "Selami", LastName = "Özden", BirthDate = new DateTime(1983, 1, 1), IdentityId = "33333333333"
            };

            Product product1 = new Product()
            {
                Id = 1, Name = "GTA", Price = 100
            };
            Product product2 = new Product()
            {
                Id = 2, Name = "FIFA", Price = 100
            };
            Product product3 = new Product()
            {
                Id = 3, Name = "WOW", Price = 100
            };

            Campaing campaing1 = new Campaing()
            {
                Id = 1, CampainingName = "Black Friday Campaing", Price = 50
            };
            Campaing campaing2 = new Campaing()
            {
                Id = 2, CampainingName = "New Year Campaing", Price = 50
            };

            ICustomerManager customerManager = new CustomerManager(new CustomerCheckManager());

            customerManager.Add(customer1);
            customerManager.Update(customer2);
            customerManager.Delete(customer3);

            CampainingManager campainingManager = new CampainingManager();

            campainingManager.Add(campaing1);
            campainingManager.Delete(campaing1);

            IProductManager productManager = new ProductManager();

            productManager.Add(product1);
            productManager.Update(product2);
            productManager.Delete(product3);

            ISalesManager salesManager = new SalesManager();

            salesManager.Sell(customer1, product1);
            salesManager.SellWithCampain(customer2, product2, campaing1);
        }
示例#18
0
        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);
        }
示例#19
0
        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);
        }
示例#20
0
        static void Main(string[] args)
        {
            //Doğrulama (Validation) Denemesi
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = 1998,
                FirstName      = "AHMET",
                LastName       = "TANRIKULU",
                IdentityNumber = 12345678910
            });

            //Kampanya Ekleme
            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(new Campaign
            {
                CampaignId          = 1,
                CampaignCategorryId = 3,
                CampaignName        = "İlk Alışverişe %25 İndirim"
            });
            Console.WriteLine("--------------------");

            Game game = new Game
            {
                GameId        = 1,
                GameCategorry = 2,
                GameName      = "CS Go",
                GamePrice     = 25
            };

            Gamer gamer = new Gamer
            {
                Id             = 1,
                BirthYear      = 1998,
                FirstName      = "AHMET",
                LastName       = "TANRIKULU",
                IdentityNumber = 12345678910
            };

            Campaign campaign = new Campaign
            {
                CampaignId          = 1,
                CampaignCategorryId = 3,
                CampaignName        = "İlk Alışverişe %25 İndirim",
                CampaignGo          = game.GamePrice - (game.GamePrice * 0.25)
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Add(gamer, game, campaign);
        }
示例#21
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer1       = new Gamer()
            {
                Id             = 1,
                FirstName      = "Onur",
                LastName       = "Yıldız",
                IdentityNumber = "68413561",
                BirthYear      = 1992
            };
            Gamer gamer2 = new Gamer()
            {
                Id             = 2,
                FirstName      = "Muharrem",
                LastName       = "Kehribar",
                IdentityNumber = "56398635",
                BirthYear      = 1998
            };

            gamerManager.Add(gamer1);
            Game game1 = new Game()
            {
                GameName = "AGE OF 2", GameId = 1, GamePrice = 50, Discount = 15
            };
            Game game2 = new Game()
            {
                GameName = "DESPERADOS 2", GameId = 2, GamePrice = 25, Discount = 10
            };
            Game game3 = new Game()
            {
                GameName = "THE GODFATHER", GameId = 3, GamePrice = 10, Discount = 3
            };

            Campaign campaign1 = new Campaign()
            {
                CampaingId = 1, CampaingName = "New Year Campaign", DiscountRate = 20
            };
            Campaign campaign2 = new Campaign()
            {
                CampaingId = 2, CampaingName = "Spring Campaign", DiscountRate = 15
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
            campaignManager.Add(campaign2);

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer1, game2);
            salesManager.CampaignSales(game2, gamer1, campaign2);
        }
示例#22
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer1       = new Gamer()
            {
                Id             = 1,
                FirstName      = "Can",
                LastName       = "Evcimen",
                IdentityNumber = "123456",
                BirthYear      = 2001
            };
            Gamer gamer2 = new Gamer()
            {
                Id             = 2,
                FirstName      = "Yahya",
                LastName       = "Nehir",
                IdentityNumber = "12344",
                BirthYear      = 2000
            };

            gamerManager.Add(gamer1);
            Game game1 = new Game()
            {
                GameName = "CS:GO", GameId = 1, GamePrice = 30, Discount = 20
            };
            Game game2 = new Game()
            {
                GameName = "VALORANT", GameId = 2, GamePrice = 1, Discount = 99
            };
            Game game3 = new Game()
            {
                GameName = "LOL", GameId = 1, GamePrice = 10, Discount = 70
            };

            Campaign campaign1 = new Campaign()
            {
                CampaingId = 1, CampaingName = "New Member Campaign", DiscountRate = 20
            };
            Campaign campaign2 = new Campaign()
            {
                CampaingId = 2, CampaingName = "First purchase campaign", DiscountRate = 15
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
            campaignManager.Add(campaign2);

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer1, game2);
            salesManager.CampaignSales(game2, gamer1, campaign2);
        }
示例#23
0
        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);
        }
示例#24
0
        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);
        }
示例#25
0
        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);
        }
示例#26
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer
            {
                ID            = 1,
                FirstName     = "Ömer Faruk",
                LastName      = "Çelik",
                DateOfBirth   = new DateTime(1995, 1, 1),
                NationalityID = "12345678901"
            };

            Customer customer2 = new Customer
            {
                ID            = 2,
                FirstName     = "Ali",
                LastName      = "Veli",
                DateOfBirth   = new DateTime(1986, 1, 1),
                NationalityID = "12345678901"
            };

            CustomerManager customerManager = new CustomerManager(new EDevletServiceAdapter());

            customerManager.Add(customer1);
            customerManager.Add(customer2);

            customerManager.Update(customer2);
            customerManager.Delete(customer1);

            Game game = new Game {
                ID = 1, Name = "Call Of Duty", PublishDate = new DateTime(2018, 11, 11)
            };

            GameManager gameManager = new GameManager();

            gameManager.Add(game);
            List <Game> gameList = new List <Game>();

            gameList.Add(game);

            Campaign campaign = new Campaign
            {
                ID        = 1,
                Name      = "Kış İndirimleri",
                StartDate = new DateTime(2021, 2, 15),
                EndDate   = new DateTime(2021, 4, 1)
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Sell(customer1, gameList, campaign);
        }
示例#27
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new NewEStateUserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1999, FirstName = "İLHAN", LastName = "ÖDÜN", IdentityNumber = 11234
            });

            SalesManager salesManager = new SalesManager(new NEWProduct());

            salesManager.Add(new Sales {
                ProductId = 1, ProductName = "ENGIN DEMIROG's MANHOOD"
            });
        }
示例#28
0
        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);
        }
示例#29
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer        = new Gamer
            {
                Id             = 1,
                FirstName      = "Muhammet Ali",
                LastName       = "Yalçın",
                IdentityNumber = 22567312266,
                DateOfBirth    = new DateTime(1997, 6, 11)
            };

            Gamer gamer2 = new Gamer
            {
                Id             = 4,
                FirstName      = "ABDURRAHMAN YASİN",
                LastName       = "TAŞ",
                IdentityNumber = 36644051368,
                DateOfBirth    = new DateTime(1995, 8, 26)
            };

            gamerManager.Add(gamer);


            CampaignRateManager campaignRateManager = new CampaignRateManager();
            Campaign            campaign            = new Campaign
            {
                CampaignId   = 2,
                CampaignName = "Abduction. %40 OFF!",
                DiscountRate = 0.40M
            };

            campaignRateManager.Add(campaign);

            GameManager gameManager = new GameManager();
            Game        game        = new Game
            {
                GameId    = 3,
                GameName  = "HelloWorld",
                GamePrice = 450
            };

            gameManager.Add(game);

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer, game);
            salesManager.CampaignSales(gamer, game, campaign);
        }
示例#30
0
        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);
        }