static void Main(string[] args)
        {
            Gamer gamer = new Gamer
            {
                DateOfBirth = new DateTime(1995, 5, 19), FirstName = "ARMAĞAN", LastName = "ŞAHİN", Id = 1, NationalityId = "11189245922"
            };
            BaseGamerManager gamerManager = new GamerManager(new PersonCheckManager());

            gamerManager.Save(gamer);

            Campaign campaign = new Campaign {
                CampaignName = "%20 indirim", CampaignRate = 0.2
            };

            Product product1 = new Product {
                Id = 1, ProductName = "Assassin's Creed", UnitPrice = 150
            };
            Product product2 = new Product {
                Id = 2, ProductName = "PUBG", UnitPrice = 80
            };

            ISalesService salesService = new SalesManager();

            salesService.CampaignSale(product1, gamer, campaign);
        }
Пример #2
0
        static void Main(string[] args)
        {
            BaseGamerManager gamerManager = new GamerManager(new MernisServiceAdapter()); // gameManager newledik ama Mernis servisi ile

            Gamer gamer1 = new Gamer()                                                    //gamer1 tanımlama
            {
                FirstName        = "Abdurrahman Görkem",
                LastName         = "ARISOY",
                BirthDate        = new DateTime(1988, 4, 9),
                NationalIdNumber = "38422550582",
                Id = 1
            };

            gamerManager.Save(gamer1);          //gamerManager kullanımı
            gamerManager.Update(gamer1);
            gamerManager.Delete(gamer1);

            Game game1 = new Game()     //game1 tanımlama
            {
                GameName        = "Clash of Clans",
                GameDescription = "Mühteşem bir oyun",
                GameId          = 1,
                GamePrice       = 25
            };

            GameManager gameManager = new GameManager();        //gameManager newledik.

            gameManager.Add(game1);
            gameManager.Update(game1);      //gameManager kullanımı
            gameManager.Delete(game1);

            Kampanya kampanya1 = new Kampanya()     //kampanya1 tanımlama
            {
                CampName     = "Büyük Kampanya",
                CampDiscount = 25,
                CampId       = 1
            };

            CampaignManager campaignManager = new CampaignManager();    //campaignManager newledik

            campaignManager.Add(kampanya1);
            campaignManager.Update(kampanya1);  //campaignManager kullanımı
            campaignManager.Delete(kampanya1);

            SalesManager salesManager = new SalesManager();     //salesManager Newledik

            salesManager.Sale(gamer1, game1);
            salesManager.CampaignSale(gamer1, game1, kampanya1);  //kullanımı

            Console.ReadLine();
        }
Пример #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);
        }
Пример #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("FIFA player işlemeleri");
            Gamer fifaGamer = new Gamer()
            {
                FirstName     = "fifaGamerManager Gamer FirstName",
                LastName      = "fifaGamerManager LastName",
                NationalityId = "01234567890",
                YearOfBirth   = new DateTime(2000, 1, 1)
            };
            FifaGamerManager fifaGamerManager = new FifaGamerManager(new GamerCheckManager());

            fifaGamerManager.Add(fifaGamer);
            Console.WriteLine();
            Console.WriteLine("CSGO player işlemeleri");

            Gamer csgoGamer = new Gamer()
            {
                FirstName     = "csgoGamerManager Gamer FirstName",
                LastName      = "csgoGamerManager LastName",
                NationalityId = "01234567890",
                YearOfBirth   = new DateTime(2000, 1, 1)
            };

            CSGOGamerManager csgoGamerManager = new CSGOGamerManager(new GamerCheckManager());

            csgoGamerManager.Add(csgoGamer);
            Console.WriteLine();
            Console.WriteLine("Game İşlemleri");
            Game csgGame = new Game()
            {
                GameName = "CS Go", GamePrice = 1200
            };
            Game fifaGame = new Game()
            {
                GameName = "Fifa 2020", GamePrice = 1900
            };
            GameDal csgGameDal = new GameDal();

            csgGameDal.Add(csgGame);
            GameDal fifaGameDal = new GameDal();

            fifaGameDal.Add(fifaGame);

            Console.WriteLine();
            Console.WriteLine("Campaign İşlemleri");
            Campaign fifaCampaign = new Campaign()
            {
                CampaignDiscount = 10, CampaignName = "Covid 2020"
            };
            Campaign csgoCampaign = new Campaign()
            {
                CampaignDiscount = 19, CampaignName = "Covid 2021 "
            };
            CampaignDal campaignDal = new CampaignDal();

            campaignDal.Add(fifaCampaign);
            campaignDal.Add(csgoCampaign);

            ISalesService salesService = new SalesManager();

            salesService.CampaignSale(fifaGame, fifaGamer, fifaCampaign);
            salesService.CampaignSale(csgGame, csgoGamer, csgoCampaign);
        }