Exemple #1
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1985, FirstName = "ENGİN", LastName = "DEMİROĞ", IdentityNumber = 12345
            });
            CampaignManager campaignManager = new CampaignManager(new Campaign {
                Id = 1, Name = "Yaz", Rate = 10
            });

            campaignManager.Add();
            Game game = new Game {
                Id = 3, Name = "Pacman", Price = 15
            };
            GameManager gameManager = new GameManager(game);

            gameManager.AddCampaign(new Campaign {
                Id = 1, Name = "Yaz", Rate = 10
            });
            OrderManager orderManager = new OrderManager(new Order
            {
                Id       = 2,
                Games    = new List <Game> {
                },
                Checkout = 0
            });

            orderManager.AddToBasket(game);
            orderManager.FinalCheckout();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1996, FirstName = "merve", LastName = "teke", IdentityNumber = 123456789
            });
            gamerManager.Delete(new Gamer {
                Id = 1, BirthYear = 1996, FirstName = "merve", LastName = "teke", IdentityNumber = 123456789
            });
            gamerManager.Update(new Gamer {
                Id = 2, BirthYear = 1996, FirstName = "merve", LastName = "teke", IdentityNumber = 123456789
            });



            CampaignManager campaignManager  = new CampaignManager();
            CampaignManager campaignManager1 = new CampaignManager();

            campaignManager.Add(new Campaign()
            {
                Id           = 1,
                CampaignName = "Yaz Kampanyası",
                CampaignType = "Öğrenci İndirimi",
            });
            campaignManager1.Delete(new Campaign()
            {
                Id           = 2,
                CampaignName = "Kış Kampanyası",
                CampaignType = "Çalışan İndirimi",
            });
            campaignManager1.Update(new Campaign()
            {
                Id           = 3,
                CampaignName = "Bahar Kampanyası",
                CampaignType = "Herkes İçin İndirim",
            });

            Game game = new Game()
            {
                GameName  = "Flappy bird",
                GamePrice = 30,
            };

            SaleManager saleManager = new SaleManager(new CampaignManager());

            saleManager.Add(new Gamer {
                Id = 1
            }, new Game {
                GameName = "Flappy"
            }, new Campaign {
                CampaignName = "Kış Kampanyası"
            });
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer()
            {
                FirstName = "Yağmur", LastName = "Engin", NationalityId = 1, YearOfBirth = 2000
            };

            BaseGamerManager gamer2 = new BattlefieldGamerManager(new GamerCheckManager());

            gamer2.Save(new Gamer {
                FirstName = "Gürsel", LastName = "Tantoğlu", NationalityId = 2, YearOfBirth = 1969
            });


            Console.WriteLine("---------------------------------------------");

            Game game1 = new Game()
            {
                GameName = "Battlefield", GamePrice = 159.00
            };
            GameManager game2 = new GameManager();

            game2.Add(new Game {
                GameName = "The Sims 4", GamePrice = 151.99
            });

            Console.WriteLine("---------------------------------------------");

            Campaign campaign1 = new Campaign()
            {
                CampaignName = "Kış Sezonu ", CampaignDiscount = 10
            };
            CampaignManager campaignManager1 = new CampaignManager();

            campaignManager1.Add(new Campaign {
                CampaignName = "Açılış İndirimi ", CampaignDiscount = 6
            });

            Console.WriteLine("---------------------------------------------");

            ISalesService salesService = new SalesManager();

            salesService.CampaignSale(game1, gamer1, campaign1);
        }