static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer()
            {
                Id            = 1,
                NationalityId = 200,
                FirstName     = "Yunus Emre",
                LastName      = "Kayaoğlu",
                BirthYear     = 2002
            };
            GamerManager gamerManager = new GamerManager(new GamerValidationManager());

            gamerManager.Add(gamer1);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new NewEUserValidationManager());
            Gamer        gamer        = new Gamer()
            {
                Id = 1, FirstName = "Koray", LastName = "Halat", BirthYear = 1979, TcNo = "123456"
            };
            bool sonuc = gamerManager.Add(gamer);

            if (!sonuc)
            {
                return;
            }
            //gamerManager.Add(new Gamer { Id = 1, FirstName = "Koray", LastName = "Halat", BirthYear = 1979, TcNo = "123456" });

            Campain campain = new Campain()
            {
                Id = 1, CampainName = "Yeni Giriş Kampanyası", CampainTime = 45, CampainDiscont = "%25"
            };
            Game game = new Game()
            {
                Id = 1, GameName = "Last Of Us", Size = 52, GamePrice = 750
            };
            Order order = new Order()
            {
                OrderPrice = 720, OrderPiece = 1
            };


            GameManager gameManager1 = new GameManager();

            gameManager1.Add(game, gamer, campain);
            gameManager1.Delete(game, gamer, campain);
            gameManager1.Update(game, gamer, campain);

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

            CampainManager campain1 = new CampainManager();

            campain1.Add(campain, gamer);
            campain1.Delete(campain);
            campain1.Update(campain);

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

            OrderManager order1 = new OrderManager();

            order1.Done(order, gamer);
            order1.Non(order, gamer);
        }
        static void Main(string[] args)
        {
            GameManager  gameManager  = new GameManager();
            GamerManager gamerManager = new GamerManager(new UserControlManager());


            gamerManager.Add(new Gamer
            {
                GamerId        = 1,
                FirstName      = "Çağrı",
                LastName       = "Kibar",
                IdentityNumber = "123456789"
            });
            gamerManager.Update(new Gamer
            {
                GamerId        = 1,
                FirstName      = "Çağrı",
                LastName       = "Kibar",
                IdentityNumber = "123456789"
            });
            gamerManager.Delete(new Gamer
            {
                GamerId        = 1,
                FirstName      = "Çağrı",
                LastName       = "Kibar",
                IdentityNumber = "123456789"
            });

            gameManager.GameBuy(new Gamer
            {
                GamerId        = 1,
                FirstName      = "Çağrı",
                LastName       = "Kibar",
                IdentityNumber = "123456789"
            }, new Game
            {
                GameId    = 1,
                GameName  = "Battlefield 4",
                GamePrice = 150
            }, new Campaign
            {
                CampaignId   = 1,
                CampaignName = "%50 İndirim",
                Description  = "Promo kodu sayesinde indirim kazanırsınız"
            });
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer()
            {
                NationailtyId = 200,
                BirthYear     = 2002,
                FirstName     = "Yunus Emre",
                LastName      = "Kayaoglu"
            };

            Game game1 = new Game()
            {
                Id          = 1,
                GameName    = "Valorant",
                CompanyName = "Riot Games",
                Price       = 250
            };

            Campaign campaign1 = new Campaign()
            {
                Id             = 1,
                CampaignName   = "İlkBahar İndirimi",
                DiscountPrice  = 30,
                CampaignAmount = 250
            };

            Order order1 = new Order()
            {
                Id          = 1,
                OrderNumber = 124243
            };

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

            gamerManager.Add(gamer1);

            GameManager gameManager = new GameManager();

            gameManager.Add(game1);

            OrderManager orderManager = new OrderManager();

            orderManager.Add(order1, game1, campaign1); // oyunları ve kampanyaları el ile tanımlıyoruz fakat kampanya şartını ordermanager'da yaptık
        }
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new GamerCheckManager());

            //Yeni Oyuncu tanımlama
            Gamer gamer1 = new Gamer
            {
                Id       = 1, FirstName = "Galip", LastName = "Doğan", NationalityId = 11111111111,
                BirthDay = new DateTime(1986, 11, 4)
            };

            //Yeni Oyuncu Ekleme

            gamerManager.Add(gamer1);

            //Yeni Oyun tanımlama
            Game game1 = new Game();

            game1.Id       = 1;
            game1.GameName = "Oyun1";

            //Yeni Kampanya tanımlama
            Campaign campaign1 = new Campaign();

            campaign1.CampaignName      = "Yeni Kampanya";
            campaign1.CapmpaignDiscount = 25;

            //Oyun Ekleme
            GameManager gameManager = new GameManager();

            gameManager.Add(game1);

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

            campaignManager.Add(campaign1);

            //Satış yapıldı
            SalesManager salesManager = new SalesManager();

            salesManager.Add(gamer1, game1, campaign1);
        }
Exemple #6
0
        static void Main(string[] args)
        {
            IUserValidationService userValidationService = new UserValidationManager();
            GamerManager           gamerManager          = new GamerManager(userValidationService);

            //veya GamerManager gamerManager = new GamerManager(new UserValidationManager());
            gamerManager.Add(new Gamer
            {
                Id             = 1,
                FirstName      = "Dilek",
                LastName       = "Atmaca",
                BirthYear      = 1995,
                IdentityNumber = 5562
            });
            //gamerManager.Update(...);
            //gamerManager.Delete(...);


            //kampanya işlemleri
            ICampaignService campaignService = new CampaignManager();
            Campaign         campaign        = new Campaign
            {
                Id             = 1,
                CampaignName   = "Yeni Yıl Kampanyası",
                DiscountAmount = 9.99,
                ValidityDate   = new DateTime(2021, 01, 31),
            };

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


            //satış işlemleri....
            Gamer gamer2 = new Gamer {
                Id = 2, FirstName = "Altuğ", LastName = "Atmaca", BirthYear = 1993, IdentityNumber = 6255
            };
            ISalesService salesService = new SalesManager();

            salesService.Sell(gamer2);
            salesService.Sell(gamer2, campaign);
        }
Exemple #7
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = new DateTime(1988),
                FirstName      = "ETHEM ANIL",
                LastName       = "SANDALCI",
                IdentityNumber = 12345
            });

            GameManager gameManager = new GameManager();

            gameManager.Add(new Game
            {
                Id           = 3,
                ProductName  = "Diablo III",
                ProductPrice = 19
            });

            OfferManager offerManager = new OfferManager();

            offerManager.Add(new Offer
            {
                Id        = 5,
                OfferName = "Legend Of Summer",
                Discount  = 30
            });

            SaleManager salesManager = new SaleManager();

            salesManager.Add(new Gamer {
                FirstName = "ETHEM ANIL, "
            }, new Game {
                ProductName = "Diablo, "
            }, new Offer {
                OfferName = "Legend Of Summer"
            });
        }
Exemple #8
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer        = new Gamer()
            {
                Id        = 8,
                FirstName = "Benazir",
                LastName  = "Ateş",
                BirthYear = 1997,
                TcNo      = "12369547852"
            };

            gamerManager.Add(gamer);

            Campaign campaign = new Campaign()
            {
                Id           = 1,
                CampaignName = "TARAFTAR",
                CampaignRate = 45
            };

            Game game = new Game()
            {
                GameByte = 160,
                GameName = "jUMANJİ",
                Price    = 50,
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign);

            GameSellManager gameSellManager = new GameSellManager(campaign, game);

            gameSellManager.sell(gamer, game, campaign);



            Console.WriteLine();
        }
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                NationalityId = "12345678910", BirthYear = 1998, FirstName = "Mert", LastName = "ÇALIŞ"
            });

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Update(new Campaign {
                CampaignName = "İlk ürün indirimi", CampaignDiscount = 20, CampaignId = "1"
            });

            OrderManager orderManager = new OrderManager();

            orderManager.CreateOrder(new Order {
                OrderId = "1", OrderName = "MSI LAPTOP"
            }, new Campaign {
                CampaignDiscount = 20, CampaignId = "2", CampaignName = "MSI URUN INDIRIMI"
            });
        }
Exemple #10
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);
        }
Exemple #11
0
        static void Main(string[] args)
        {
            //Gamer ekleme
            Gamer gamer1 = new Gamer();

            gamer1.FirstName        = "Fadime";
            gamer1.LastName         = "DURĞUN";
            gamer1.GamerId          = 1234;
            gamer1.DateOfBirthYear  = 2000;
            gamer1.NationalIdentity = 12345678910;

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

            gamerManager.Add(gamer1);

            //Oyun ekleme
            Game game1 = new Game();

            game1.GameName  = "Pubgy";
            game1.GameId    = 123456;
            game1.GamePrice = 100;

            GameManager gameManager = new GameManager();

            gameManager.Delete(game1);


            //Kampanya ekleme
            Campaign campaign1 = new Campaign();

            campaign1.CampaignName = "Yılbaşı kampanyası";
            campaign1.CampaingId   = 147852;
            campaign1.Discount     = 25;

            CampaignManager campaignManager1 = new CampaignManager();

            campaignManager1.Add(campaign1);
        }
Exemple #12
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new IValidationManager());
            Gamer        gamer        = new Gamer()
            {
                FirstName = "Mutluhan", LastName = "Avcı", DateOfBirth = 1999, TCno = 123456789
            };
            Game game = new Game()
            {
                GameId = 1, GameName = "Call of Duty MW2", GamePrice = 120
            };

            gamerManager.Add(gamer);

            IValidationManager validationManager = new IValidationManager();

            validationManager.Validate(gamer);

            CampaignManager campaign  = new CampaignManager();
            Campaign        campaign1 = new Campaign()
            {
                CampaignName = "Cpt.Price", DiscountRate = 30, RaiseRate = 15
            };

            campaign.Add(campaign1, game);
            campaign.Delete(campaign1, game);
            campaign.Update(campaign1, game);

            SaleManager sale  = new SaleManager();
            Sale        sale1 = new Sale()
            {
                GameName = "Call of Duty MW2", Gamer = "Mutluhan Avcı", Price = 249
            };

            sale.Sales(game, gamer, sale1);
            sale.CampaignSales(game, gamer, campaign1, sale1);
        }
        static void Main(string[] args)
        {
            IGamerService gamer1 = new GamerManager(new UserValidationManager());

            gamer1.Add(new Gamers
            {
                GamerId        = 1,
                GamerFirstName = "ENES",
                GamerLastName  = "TURKMEN",
                GamerTcNo      = 123456789, //dogru bilgiye sahip gamer = 12345678901
                YearOfBirth    = 1997
            });
            Console.WriteLine("----------------------------");

            GameManager game1 = new GameManager();

            game1.Add(new Games
            {
                GameId       = 101,
                GameName     = "GTA 5",
                Price        = 180,
                UnitsInStock = 50
            });
            Console.WriteLine("----------------------------");

            ICampaignService campaign1 = new CampaignManager();

            campaign1.Add(new Campaign
            {
                CampaignId   = 101,
                CampaignName = "Winter season!"
            });
            Console.WriteLine("----------------------------");

            ISalesService sales = new GameSaleManager(new GameManager());
            //sales.Sale(game1);
        }
Exemple #14
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new ValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ"
            });
            //gamerManager.Delete(new Gamer { Id = 2, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ" });
            //gamerManager.Update(new Gamer { Id = 3, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ" });



            GameManager gameManager = new GameManager();

            gameManager.Buy(new Gamer {
                Id = 2, BirthYear = 2005, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ"
            });
            //gameManager.Delete(new Gamer { Id = 1, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ" });
            //gameManager.NewCampaign(new Gamer { Id = 1, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ" });
            //gameManager.CampaignDeletion(new Gamer { Id = 1, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ" });
            gameManager.CampaignUpdate(new Gamer {
                Id = 1, BirthYear = 2003, TcNo = 123456, FirstName = "Enes", LastName = "ÜLKÜ"
            });
        }
Exemple #15
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new MernisServiceAdapter());
            Gamer        gamer        = new Gamer()
            {
                FirstName     = "Davut",
                NationalityId = "86454653",
                DateOfBirth   = new DateTime(1961, 07, 26),
                LastName      = "istanbul",
                Id            = 1
            };
            Gamer gamer2 = new Gamer()
            {
                FirstName     = "gül",
                NationalityId = "346464678",
                DateOfBirth   = new DateTime(1978, 07, 26),
                LastName      = "İstanbul",
                Id            = 2
            };

            gamerManager.Add(gamer);
            gamerManager.Delete(gamer);
            gamerManager.Update(gamer);
            gamerManager.Add(gamer2);
            gamerManager.Delete(gamer2);
            gamerManager.Update(gamer2);

            Game game = new Game()
            {
                Id          = 1,
                Name        = "GTA 6",
                Description = "Guzel oyun" +
                              "Helikopter gorevi var.",
                Price = 200
            };
            Game game2 = new Game()
            {
                Id          = 2,
                Name        = "PES",
                Description = "Futbol oyunu" +
                              "Kariyer modu geldi.",
                Price = 300
            };
            GameManager gameManager = new GameManager();

            gameManager.Add(game);
            gameManager.Update(game);
            gameManager.Delete(game);
            gameManager.Add(game2);
            gameManager.Update(game2);
            gameManager.Delete(game2);

            Campaign campaign = new Campaign()
            {
                Id              = 1,
                Discount        = 80,
                Name            = "Summer Discount",
                CampaignEndTime = new DateTime(2021, 09, 26)
            };
            Campaign campaign2 = new Campaign()
            {
                Id              = 1,
                Discount        = 80,
                Name            = "Winter Discount",
                CampaignEndTime = new DateTime(2021, 03, 26)
            };
            CampaignManager campaignManager = new CampaignManager();

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

            SaleManager salesManager = new SaleManager();

            salesManager.Sale(gamer, game);
            salesManager.CampaignSale(gamer, game, campaign);
            salesManager.Sale(gamer2, game2);
            salesManager.CampaignSale(gamer2, game2, campaign2);
        }
Exemple #16
0
        static void Main(string[] args)
        {
            BaseGamerManager gamerManager = new GamerManager(new MernisServiceAdapter());

            Gamer gamer1 = new Gamer()
            {
                FirstName     = "Ufuk",
                LastName      = "ALTAY",
                DateOfBirth   = 1985,
                NationalityId = 54331490504,
                Id            = 1
            };

            gamerManager.Add(gamer1);

            //OyuncuEkle(gamerManager);

            //Console.WriteLine("**************************************");
            //Console.WriteLine("Nasıl devam etmek istersiniz ?");
            //Console.WriteLine("Oyuncu eklemek için (1)");
            //Console.WriteLine("Oyuncu güncelleme için (2)");
            //Console.WriteLine("Oyuncu silme için (3)");

            //int tercih = Convert.ToInt32(Console.ReadLine());

            //switch (tercih)
            //{
            //    case 1:
            //        Console.WriteLine("Oyuncu Ekleme seçildi");
            //        break;
            //    case 2:
            //        Console.WriteLine("Oyuncu Güncelleme seçildi");
            //        break;
            //    case 3:
            //        Console.WriteLine("Oyuncu Silme seçildi");
            //        break;
            //    default:
            //        Console.WriteLine("Yanlış seçim yaptınız");
            //        break;
            //}

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


            GameManager gameManager = new GameManager();
            Game        game1       = new Game()
            {
                GameId = 1, GameName = "Mario", GamePrice = 100
            };
            Game game2 = new Game()
            {
                GameId = 2, GameName = "Snake", GamePrice = 50
            };
            Game game3 = new Game()
            {
                GameId = 3, GameName = "Space Impact", GamePrice = 30
            };

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


            CampaignManager campaignManager = new CampaignManager();
            Campaign        campaign1       = new Campaign()
            {
                CampaignId = 1, CampaignName = "Efsane Cuma", CampaignDiscount = 15
            };
            Campaign campaign2 = new Campaign()
            {
                CampaignId = 2, CampaignName = "Şahane Kasım", CampaignDiscount = 20
            };

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


            Console.ReadLine();
        }
Exemple #17
0
        static void Main(string[] args)
        {
            List <Gamer>    gamers              = new List <Gamer>();
            IManagerService managerServiceGame  = new GameManager();
            IManagerService managerServiceGamer = new GamerManager();
            ISaleService    newyearsale         = new NewYearSaleManager();
            ISaleService    blackfridaysale     = new BlackFridaySaleManager();
            IEntity         gamer1              = new Gamer()
            {
                Name           = "Rüstem",
                Surname        = "Karademir",
                BirthYear      = 1991,
                SecurityNumber = "12346567890"
            };
            IEntity gamer2 = new Gamer()
            {
                Name           = "Muhammed",
                Surname        = "Karademir",
                BirthYear      = 1991,
                SecurityNumber = "12346567890"
            };
            IEntity game1 = new Game()
            {
                Name        = "Witcher 3",
                Catagory    = "Aksiyon",
                CompanyName = "Red Project",
                Price       = 50
            };
            IEntity game2 = new Game()
            {
                Name        = "Crysis",
                Catagory    = "Aksiyon",
                CompanyName = "Crytek",
                Price       = 30
            };

            managerServiceGamer.Add(gamer1);
            managerServiceGamer.Add(gamer2);
            managerServiceGame.Add(game1);
            managerServiceGame.Add(game2);
            Console.Clear();
            int xwhile = 1;

            while (xwhile == 1)
            {
                Console.WriteLine("**********MENU**********");
                Console.WriteLine("1) Oyuncu Ekle\n2) Oyuncu Sil\n3) Oyuncu Güncelle\n4) Oyuncuları Listele\n5) Oyun Ekle\n6) Oyun Sil\n7) Oyun Güncelle\n8) Oyunları Listele\n9) Kampanya Seçimi\n0) Çıkış");
                Console.WriteLine("************************");
                int secim = Convert.ToInt32(Console.ReadLine());
                Console.Clear();
                if (secim <= 9 && secim >= 0)
                {
                    switch (secim)
                    {
                    case 1:
                        Console.WriteLine("Oyuncu Adı: ");
                        string Name = Console.ReadLine();
                        Console.WriteLine("Oyuncu Soyadı: ");
                        string SurName = Console.ReadLine();
                        Console.WriteLine("Oyuncu Doğum Yılı: ");
                        int BirthYear = Convert.ToInt32(Console.ReadLine());
                        Console.WriteLine("Oyuncu TcNo: ");
                        string  SecurityNumber = Console.ReadLine();
                        IEntity gamer3         = new Gamer()
                        {
                            Name           = Name,
                            Surname        = SurName,
                            BirthYear      = BirthYear,
                            SecurityNumber = SecurityNumber
                        };
                        managerServiceGamer.Add(gamer3);
                        break;

                    case 2:
                        Console.WriteLine("Silmek istediğiniz oyuncunun Adını giriniz:");
                        managerServiceGamer.Delete(Console.ReadLine());
                        break;

                    case 3:
                        Console.WriteLine("Güncellemek istediğiniz oyuncunun Adını giriniz:");
                        string name = Console.ReadLine();
                        managerServiceGamer.Update(name);
                        break;

                    case 4:
                        managerServiceGamer.List();
                        break;

                    case 5:
                        Console.WriteLine("Oyun Adı: ");
                        string GameName = Console.ReadLine();
                        Console.WriteLine("Oyun Türü: ");
                        string Catagory = Console.ReadLine();
                        Console.WriteLine("Yapım Şirketi: ");
                        string CompanyName = Console.ReadLine();
                        Console.WriteLine("Oyun Fiyatı: ");
                        int     Price = Convert.ToInt32(Console.ReadLine());
                        IEntity game3 = new Game()
                        {
                            Name        = GameName,
                            Catagory    = Catagory,
                            CompanyName = CompanyName,
                            Price       = Price
                        };
                        managerServiceGame.Add(game3);
                        break;

                    case 6:
                        Console.WriteLine("Silmek istediğiniz oyunun Adını giriniz:");
                        managerServiceGame.Delete(Console.ReadLine());
                        break;

                    case 7:
                        Console.WriteLine("Güncellemek istediğiniz oyunun Adını giriniz:");
                        string Gamename = Console.ReadLine();
                        managerServiceGame.Update(Gamename);
                        break;

                    case 8:
                        managerServiceGame.List();
                        break;

                    case 9:
                        Console.WriteLine("Kampanya Menüsü");
                        Console.WriteLine("1) Yeni Yıl Kampanyası\n2) Efsane Cuma Kampanyası");
                        Console.WriteLine("---------------");
                        int secim2 = Convert.ToInt32(Console.ReadLine());
                        Console.Clear();

                        if (secim2 <= 2 && secim2 >= 1)
                        {
                            switch (secim2)
                            {
                            case 1:
                                managerServiceGame.List();
                                Console.WriteLine("Yeni Yıl kampanyası uygulamak istediğiniz oyunun adını yazınız: ");
                                string newyearsalegame = Console.ReadLine();
                                Console.Clear();
                                newyearsale.Sale(newyearsalegame);
                                break;

                            case 2:
                                managerServiceGame.List();
                                Console.WriteLine("Efsane Cuma kampanyası uygulamak istediğiniz oyunun adını yazınız: ");
                                string blackfridaysalegame = Console.ReadLine();
                                Console.Clear();
                                newyearsale.Sale(blackfridaysalegame);
                                break;

                            default:
                                break;
                            }
                        }
                        else
                        {
                            Console.WriteLine("Hatalı giriş yaptınız.");
                        }
                        break;

                    case 0:
                        Console.WriteLine("Çıkış yapılıyor.");
                        xwhile = 0;
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    Console.WriteLine("Hatalı giriş yaptınız.");
                }
            }
        }
Exemple #18
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer()
            {
                Id = 1, IdentityNumber = "11111111111", Name = "Can", LastName = "Yaman", Dob = 1998
            };
            Gamer gamer2 = new Gamer()
            {
                Id = 2, IdentityNumber = "22222222222", Name = "Ceren", LastName = "Yaman", Dob = 2008
            };
            Gamer gamer3 = new Gamer()
            {
                Id = 3, IdentityNumber = "33333333333", Name = "Neslihan", LastName = "Yaman", Dob = 2004
            };
            IGamerServices gamerManager = new GamerManager();

            gamerManager.Add(gamer1);
            gamerManager.Add(gamer2);
            gamerManager.Add(gamer3);

            ValidateManager validateManager = new ValidateManager();

            validateManager.IsValid(gamer1);
            validateManager.IsValid(gamer2);
            validateManager.IsValid(gamer3);
            Game game1 = new Game()
            {
                Id = 1, Name = "GTA", Price = 100
            };
            Game game2 = new Game()
            {
                Id = 2, Name = "FIFA 2021", Price = 200
            };
            Game game3 = new Game()
            {
                Id = 3, Name = "CALL OF DUTY", Price = 300
            };
            IGameServices gameManager = new GameManager();

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

            Campaign campaign1 = new Campaign()
            {
                Id = 1, Name = "Student Campaign", StartingDate = 2020, EndDate = 2022
            };
            Campaign campaign2 = new Campaign()
            {
                Id = 2, Name = "Black Friday Campaign", StartingDate = 2020, EndDate = 2021
            };
            Campaign campaign3 = new Campaign()
            {
                Id = 3, Name = "Gamer Campaign", StartingDate = 2021, EndDate = 2022
            };
            ICampaignServices campaignServices = new CampaignManager();

            campaignServices.Add(campaign1);
            campaignServices.Add(campaign2);
            campaignServices.Add(campaign3);
            gameManager.SellGame(game1, gamer1, campaign1);
            gameManager.SellGame(game2, gamer2, campaign2);
            gameManager.SellGame(game3, gamer3, campaign3);
        }
Exemple #19
0
        static void Main(string[] args)
        {
            GamerManager gamerManager1 = new GamerManager(new GamerValidationManager());
            Gamer        gamer1        = new Gamer()
            {
                GamerId = 1, GamerFirstName = "Delal", GamerLastName = "Karakuş", DateofBirth = 1995, NationalityId = "123456"
            };

            GamerManager gamerManager2 = new GamerManager(new GamerValidationManager());
            Gamer        gamer2        = new Gamer()
            {
                GamerId = 2, GamerFirstName = "Murat", GamerLastName = "Altınok", DateofBirth = 1992, NationalityId = "522481"
            };

            GamerManager gamerManager = new GamerManager(new GamerValidationManager());

            gamerManager.Add(gamer1);
            gamerManager.Update(gamer1);
            gamerManager.Delete(gamer1);
            gamerManager.Add(gamer2);
            gamerManager.Update(gamer2);
            gamerManager.Delete(gamer2);

            Game game1 = new Game()
            {
                GameId = 1, GameName = "Dead by Daylight", GamePrice = 200
            };
            Game game2 = new Game()
            {
                GameId = 2, GameName = "Life is Satrange", GamePrice = 150
            };
            Game game3 = new Game()
            {
                GameId = 3, GameName = "Shadow of War", GamePrice = 300
            };

            GameManager gameManager = new GameManager();

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

            Campaign campaign1 = new Campaign()
            {
                CampaignId = 1, CampaignName = "Yılbaşı Kampanyası", DiscountRate = 25
            };
            Campaign campaign2 = new Campaign()
            {
                CampaignId = 2, CampaignName = "Yaz Kampanyası", DiscountRate = 15
            };

            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(game1, gamer2);
            salesManager.CampaignSales(game3, gamer1, campaign2);

            SalesManager salesmanager = new SalesManager();

            salesManager.Sales(game1, gamer1);
            salesManager.Sales(game2, gamer2);
            salesManager.CampaignSales(game3, gamer2, campaign1);
            salesManager.CampaignSales(game2, gamer1, campaign2);
        }
Exemple #20
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer()
            {
                FirstName      = "Necdet",
                LastName       = "Aygün",
                BirthYear      = 1930,
                IdentityNumber = "12345678910"
            };

            Gamer gamer2 = new Gamer()
            {
                FirstName      = "Yasemin",
                LastName       = "Ünsal",
                BirthYear      = 1932,
                IdentityNumber = "10987654321"
            };

            Campaign campaign = new Campaign()
            {
                Id       = 1,
                Name     = "BigGame",
                Discount = 40
            };

            Game game = new Game()
            {
                Id        = 1,
                Name      = "Sims",
                Price     = 139,
                UnitStock = 12
            };


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

            gamerManager.Add(gamer1);
            gamerManager.Delete(gamer1);
            gamerManager.Update(gamer1);

            gamerManager.Add(gamer2);
            gamerManager.Delete(gamer2);
            gamerManager.Update(gamer2);

            GameManager gameManager = new GameManager();

            gameManager.Add(game);
            gameManager.Delete(game);
            gameManager.Update(game);

            CampaignManager campaignManager = new CampaignManager();

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

            SaleManager saleManager = new SaleManager();

            saleManager.Sale(gamer1, campaign, game);
            saleManager.Sale(gamer2, campaign, game);

            Console.Read();
        }
Exemple #21
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id        = 1;
            gamer1.FirstName = "Nizes";

            Gamer gamer2 = new Gamer();

            gamer1.Id        = 2;
            gamer1.FirstName = "Lore";


            GameManager gameManager = new GameManager();

            gameManager.Add(new Game {
                Id = 1, Name = "Saklambaç", Price = 50
            });
            gameManager.Add(new Game {
                Id = 2, Name = "Köşe kapmaca", Price = 60
            });
            gameManager.Add(new Game {
                Id = 3, Name = "Mendil kapmaca", Price = 70
            });

            GamerManager gamerManager = new GamerManager();

            gamerManager.Add(new Gamer {
                Id = 1, FirstName = "Nizes"
            });
            gamerManager.Add(new Gamer {
                Id = 2, FirstName = "Lore"
            });

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(new Campaign {
                Id = 1, Name = "1 alana % 10"
            });
            campaignManager.Add(new Campaign {
                Id = 2, Name = "2 alana % 20"
            });
            campaignManager.Add(new Campaign {
                Id = 3, Name = "3 alana % 30"
            });


            OrderManager orderManager = new OrderManager();

            orderManager.Add(new Order {
                Id = 1, CampaignName = 1
            });
            orderManager.Add(new Order {
                Id = 2, CampaignName = 2
            });
            orderManager.Add(new Order {
                Id = 3, CampaignName = 3
            });


            Console.WriteLine();
        }