Beispiel #1
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer {
                FirstName = "Orhan", LastName = "Doğan", BirthYear = 1990, NationalityId = 12345678910
            };

            BaseCustomerManager customerManager = new CustomerManager(new CheckPersonManager());

            customerManager.Add(customer1);

            Game game1 = new Game {
                Name = "PES", Category = "Futbol", UnitPrice = 100, CategoryId = 11, Id = 10
            };

            GameSellManager gameSaleManager = new GameSellManager(game1);

            gameSaleManager.Sell(customer1);

            Campaign campaign = new Campaign {
                CampaignName = "KIŞ KAMPANYASI"
            };

            CampaignManager campaignManager = new CampaignManager(game1);

            campaignManager.Add(campaign);
            campaignManager.Update(campaign);
            campaignManager.Delete(campaign);

            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer()
            {
                FirstName = "Osman", LastName = "Bal"
            };
            Campaign campaign = new Campaign()
            {
                CampaignName = "February campaign", DiscountRate = 30
            };
            Game game = new Game()
            {
                GameName = "Counter Strike Go", GamePrice = 40
            };


            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id            = 1,
                DateOfBirth   = 2000,
                FirstName     = "Osman",
                LastName      = "Bal",
                NationalityId = 12354562251
            });
            gamerManager.Delete(new Gamer
            {
                Id            = 1,
                DateOfBirth   = 2000,
                FirstName     = "Osman",
                LastName      = "Bal",
                NationalityId = 12354562251
            });
            gamerManager.Update(new Gamer
            {
                Id            = 1,
                DateOfBirth   = 2000,
                FirstName     = "Burak",
                LastName      = "Uçan",
                NationalityId = 12354562251
            });



            GameSellManager gameSellManager = new GameSellManager();

            gameSellManager.Sell(game, gamer);

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign, game);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            GamerManager gamerManager = new GamerManager(new MernisServiceAdapter());

            IGameService csGoManager        = new CsGoManager();
            IGameService gTA5Manager        = new GTA5Manager();
            IGameService theWitcher3Manager = new TheWitcher3Manager();

            IDiscountService welcomeDiscount   = new WelcomeDiscount();
            IDiscountService christmasDiscount = new ChristmasDiscount();
            IDiscountService summerDiscount    = new SummerDiscount();

            GameSellManager gameSellManager = new GameSellManager();

            DiscountManager discountManager = new DiscountManager();

            //Gamer1 = Yasir Emin ÇİFTÇİ

            gamer1.IdentityNumber = "14347132386";
            gamer1.FirstName      = "Yasir Emin";
            gamer1.LastName       = "Çiftçi";
            gamer1.DateOfBirth    = new DateTime(1997, 3, 5);
            gamer1.Id             = 1;
            // Ağustos indirimleri Adlı bir kampya girişi yapılıyor.

            discountManager.Add(summerDiscount);
            Console.WriteLine("---------------------");

            // Yeni oyuncu kaydı yapılıyor

            gamerManager.Add(gamer1);
            Console.WriteLine("---------------------");

            // Yasir adlı oyunucu, The Witcher 3 oyununu hoş geldiniz indirimi ile satın alıyor.

            gameSellManager.Sell(gamer1, theWitcher3Manager, welcomeDiscount);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            CustormerEntitys custormerEntitys = new CustormerEntitys()
            {
                Nidentity = "1",
                Name      = "Tolgahan",
                Surname   = "Erbabi",
                BirthYear = 1996
            };

            GameSellManager gameSellManager = new GameSellManager();

            UserValiditionService userValiditionService = new UserValiditionService();
            GamesEntity           fifa21 = new GamesEntity();

            fifa21.Name  = "Fifa 21";
            fifa21.Price = 350;

            GamesEntity pes21 = new GamesEntity();

            pes21.Name  = "Pes 21";
            pes21.Price = 100;

            GamesEntity nba2k21 = new GamesEntity();

            nba2k21.Name  = "Nba 2k 21";
            nba2k21.Price = 250;

            CustomerManager customerManager = new CustomerManager(userValiditionService);

            customerManager.Register(custormerEntitys);

            ISaleManager newAccountSale = new NewAccountSale();
            ISaleManager newYearSale    = new NewYearSale();

            newAccountSale.Sale(nba2k21);
            gameSellManager.Sell(custormerEntitys, nba2k21);
        }