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

            gamerManager.Register(new Gamer
            {
                Id          = 1,
                Identity    = 123123123123,
                FirstName   = "Burak",
                LastName    = "Beşli",
                DateOfBirth = new DateTime(1994, 5, 31)
            });

            ICampaignService campaignManager = new CampaignManager();

            campaignManager.Add(new Campaign
            {
                CampaignName = "GameSatis Year of the Games indirimleri",
                Category     = "Single Player",
                Id           = 1,
                Price        = 50
            });

            IOrderService orderService = new OrderManager(campaignManager);

            orderService.Add(new Campaign
            {
                CampaignName = "GameSatis GTA V indirimleri",
                Category     = "Single Player & Multiplayer",
                Id           = 2,
                Price        = 70
            });
        }
Beispiel #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();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id             = 1;
            gamer1.FirstName      = "Emre";
            gamer1.lastName       = "Kara";
            gamer1.BrithYear      = 1999;
            gamer1.IdentityNumber = 15815793818;

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

            gamerManager.Add(new Gamer {
                Id = 1, BrithYear = 1999, FirstName = "Emre", lastName = "Kara", IdentityNumber = 15815793818
            });


            Game game1 = new Game();

            game1.GameName  = "forza horizon 4";
            game1.GamePrice = 200;


            GameSellServiceManager gameSellServiceManager = new GameSellServiceManager();

            gameSellServiceManager.Sell(gamer1, game1);

            Campaign campaign1 = new Campaign();

            campaign1.CampaignId   = 1;
            campaign1.CampaignName = "Black Friday";

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.GamerFirstName = "Merve";
            gamer1.GamerLastName  = "Dağlı";
            gamer1.TcNo           = "11111";

            GamerManager gamerManager = new GamerManager(new MernisManager());

            gamerManager.Add(gamer1);
            gamerManager.Update(gamer1);
            gamerManager.Delete(gamer1);
            Console.WriteLine(" ");
            Console.WriteLine(" ");
            Console.WriteLine(" ");

            Gamer gamer2 = new Gamer();

            gamer2.GamerFirstName = "Ali";
            gamer2.GamerLastName  = "Işık";
            gamer2.TcNo           = "22222";



            Store store1 = new Store();

            store1.StoreName = "OnlinePlayStore";

            Store store2 = new Store();

            store2.StoreName = "PlayStore";



            Console.WriteLine("Games: ");

            Game game1 = new Game();

            game1.GameName  = "Pes 2021 Season Update PS4";
            game1.GamePrice = 199.00;


            Game game2 = new Game();

            game2.GameName  = "GTA 5 PS4";
            game2.GamePrice = 177.00;


            Game game3 = new Game();

            game3.GameName  = "NBA 2K21 PS4";
            game3.GamePrice = 295.00;



            Game[] games1 = new Game[] { game1, game2, game3 };

            foreach (var game in games1)
            {
                Console.WriteLine("Game Name : " + game.GameName + " GamePrice : " + game.GamePrice + " TL");
            }

            Console.WriteLine(" ");
            Console.WriteLine(" ");
            Console.WriteLine(" ");
            Console.WriteLine("Campaigns:");


            Campaign campaign1 = new Campaign();

            campaign1.CampaignName     = "Campaign in honor of the Chinese New Year!";
            campaign1.CampaignDiscount = 20;
            Campaign campaign2 = new Campaign();

            campaign2.CampaignName     = "Campaign in honor of the Black Friday!";
            campaign2.CampaignDiscount = 30;
            Campaign campaign3 = new Campaign();

            campaign3.CampaignName = "This game has no campaign!";


            CampaignManager campaignManager = new CampaignManager();

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

            Console.WriteLine(" ");
            Console.WriteLine(" ");
            Console.WriteLine(" ");
            Console.WriteLine("Sales:");

            SalesManager salesManager = new SalesManager();

            salesManager.sales(game1, campaign1, store2, gamer1);
            salesManager.sales(game2, campaign2, store1, gamer2);
        }