Exemplo n.º 1
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = 1997,
                FirstName      = "RANA",
                LastName       = "KARATOPRAK",
                IdentityNumber = 1234567890
            });

            GameManager gameManager = new GameManager();

            gameManager.Add(new Game {
                GameName = "PUBG", GamePrice = 10.0, Id = 1
            });

            SalesManager salesManager = new SalesManager();

            salesManager.CampaignAdd(new Campaign {
                CampaignName = "İlkbahar Kampanyası", Id = 1
            });
            salesManager.Sell(new Gamer {
                FirstName = "RANA"
            }, new Game {
                GameName = "PUBG"
            });
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = 1989,
                FirstName      = "FATMA",
                LastName       = "UĞURLU",
                IdentityNumber = 28873139696
            });

            CampaingManager campaingManager = new CampaingManager();

            campaingManager.Add(new Campaing
            {
                Id               = 1,
                CampaingName     = "Süper Teklif",
                CampaignDiscount = 20,
                CampaingDuration = "2gün",
            });

            OrderManager orderManager = new OrderManager(new CampaingManager());

            orderManager.CampaignOrder(new Order
            {
                Id   = 1,
                Sale = "Nakit"
            });
            Console.WriteLine("Hello World!");
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            //Oyuncu Oluşturma
            Gamer gamer1 = new Gamer();

            gamer1.Id            = 1;
            gamer1.FirstName     = "Halil ibrahim";
            gamer1.LastName      = "Arslan";
            gamer1.NationalityId = 12345678911;
            gamer1.BirthYear     = 1995;

            //Oyuncu Ekleme
            GamerManager gamerManager1 = new GamerManager(new MernisServiceAdapter());

            gamerManager1.Add(gamer1);
            //Oyuncu Silme
            gamerManager1.Delete(gamer1);
            //Oyuncu Güncelleme
            gamerManager1.Update(gamer1);

            //Oyun Oluşturma
            Game game1 = new Game();

            game1.GameId    = 1;
            game1.GameName  = "New Era";
            game1.GamePrice = 1500;

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

            gameManager1.Add(game1);
            //Oyun Silme
            gameManager1.Delete(game1);
            //Oyun Güncelleme
            gameManager1.Update(game1);

            //Kampanya Oluşturma
            Campaign campaign1 = new Campaign();

            campaign1.CampaignId   = 1;
            campaign1.CampaignName = "Holiday Discount";
            campaign1.DiscountRate = 30;

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

            campaignManager1.Add(campaign1);
            //Kampanya Silme
            campaignManager1.Delete(campaign1);
            //Kampanya Güncelleme
            campaignManager1.Update(campaign1);

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

            //Normal Satış
            salesManager.Sales(game1, gamer1);
            //Kampanyalı Satış
            salesManager.CampaignSales(game1, gamer1, campaign1);
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            IGamerService gamerManager = new GamerManager(new UserValidationManager());
            Gamer         gamer        = new Gamer
            {
                Id             = 1,
                BirthYear      = 1996,
                FirstName      = "SEVDENUR",
                LastName       = "DEMİREL",
                IdentityNumber = 12345
            };

            gamerManager.Add(gamer);

            IGameService gameManager = new GameManager();
            Game         game        = new Game {
                GameName = "League of Legends",
                Price    = 50
            };

            gameManager.Add(game);

            ICampainService campainManager = new CampainManager();
            Campain         campain        = new Campain {
                CampainName = "",
                Discount    = 0
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Sell(gamer, game, campain);

            Console.ReadLine();
        }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id            = 1,
                BirthYear     = 1996,
                FirstName     = "Batuhan",
                LastName      = "Doğan",
                NationalityId = 12345
            });

            SaleManager saleManager = new SaleManager(new Campaign
            {
                StartDate    = new DateTime(2021, 1, 1),
                EndDate      = new DateTime(2021, 5, 10),
                DiscountRate = 0.35
            });

            saleManager.Sell(new Gamer
            {
                BirthYear     = 1996,
                FirstName     = "Batuhan",
                LastName      = "Doğan",
                Id            = 2,
                NationalityId = 12345
            }, new Game
            {
                GameId   = 27,
                GameName = "Fifa21",
                Price    = 250.75
            });
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            //Bir oyun yazmak istiyorsunuz. Bu yazılım için backend kodlarını C# ile geliştirmeyi planlıyoruz.
            //Yeni üye, satış ve kampanya yönetimi yapılması isteniyor. Nesnelere ait özellikleri istediğiniz gibi verebilirsiniz.
            //Burada amaç yazdığınız kodun kalitesidir. Ödevde gereksinimleri tam anlamadığınız durum benim için önemli değil, kendinize göre mantık geliştirebilirsiniz.
            //Dediğim gibi kod kalitesiyle ilgileniyoruz şu an :)



            //Gereksinimler

            //1.Oyuncuların sisteme kayıt olabileceği, bilgilerini güncelleyebileceği, kayıtlarını silebileceği bir ortamı simule ediniz.
            //Müşteri bilgilerinin doğruluğunu e-devlet sistemlerini kullanarak doğrulama yapmak istiyoruz.
            //(E - devlet sistemlerinde doğrulama TcNo, Ad, Soyad, DoğumYılı bilgileriyle yapılır.Bunu yapacak servisi simule etmeniz yeterlidir.)

            //2.Oyun satışı yapılabilecek satış ortamını simule ediniz.
            //(Yapılan satışlar oyuncu ile ilişkilendirilmelidir. Oyuncunun parametre olarak metotta olmasını kastediyorum.)

            //3.Sisteme yeni kampanya girişi, kampanyanın silinmesi ve güncellenmesi imkanlarını simule ediniz.

            //4.Satışlarda kampanya entegrasyonunu simule ediniz.

            //5.Ödevinizi Github’a yükleyiniz. Github linkinizi paylaşınız.

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

            gamerManager.Add(new Gamer
            {
                BirthYear      = 1984,
                FirstName      = "Engin",
                LastName       = "Demirog",
                IdentityNumber = 12345
            });
            Console.WriteLine("Hello World!");
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id             = 2;
            gamer1.FirstName      = "HASAN";
            gamer1.LastName       = "DOĞRU";
            gamer1.BirthDay       = 1987;
            gamer1.IdentityNumber = 9865475;

            GamerManager gamerManager = new GamerManager(new UserValidateManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthDay = 1990, FirstName = "RIDVAN", LastName = "BOZKIR", IdentityNumber = 123654987
            });
            gamerManager.Update(gamer1);
            gamerManager.Delete(gamer1);

            SalesManager salesManager = new SalesManager();

            salesManager.Buy(gamer1);

            Sales sales = new Sales();

            sales.Id           = 1;
            sales.GamerId      = 2;
            sales.Number       = 54874;
            sales.SalesDetails = "Bilgisayar satışı";

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(sales);
        }
Exemplo n.º 8
0
        static void Main(string[] args)
        {
            /*
             * UserStory:
             * 1.     Oyuncuların sisteme kayıt olabileceği, bilgilerini güncelleyebileceği, kayıtlarını silebileceği bir ortamı simule ediniz.
             * Müşteri bilgilerinin doğruluğunu e-devlet sistemlerini kullanarak doğrulama yapmak istiyoruz.
             * (E-devlet sistemlerinde doğrulama TcNo, Ad, Soyad, DoğumYılı bilgileriyle yapılır. Bunu yapacak servisi simule etmeniz yeterlidir.)
             *
             * 2.     Oyun satışı yapılabilecek satış ortamını simule ediniz.
             * ( Yapılan satışlar oyuncu ile ilişkilendirilmelidir. Oyuncunun parametre olarak metotta olmasını kastediyorum.)
             *
             * 3.     Sisteme yeni kampanya girişi, kampanyanın silinmesi ve güncellenmesi imkanlarını simule ediniz.
             *
             * 4.     Satışlarda kampanya entegrasyonunu simule ediniz.
             *
             * 5.     Ödevinizi Github’a yükleyiniz. Github linkinizi paylaşınız.
             */

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

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1986, FirstName = "Sercan", LastName = "Kavas", IdentityNo = 3636363
            });

            OrderManager orderManager = new OrderManager(new OfferManager());

            orderManager.ad
        }
Exemplo n.º 9
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer {
                Id = 1, BirthYear = 1991, FirstName = "ARİF", LastName = "ORAK", IdentityNumber = 12345
            };
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(gamer1);

            // Oyun Satışının Oyuncu İle İlişkilendirimesi

            GameOrder game1 = new GameOrder {
                GameId = 1, GameCompanyName = "War Craft", GamePrice = 123
            };
            GameOrderManager gameOrderManager = new GameOrderManager();
            //gameOrderManager.Selling(game1, gamer1, campaing1);

            // Kampanya Ekleme, Silme, Güncelleme

            Campaing campaing1 = new Campaing
            {
                CompaingId      = 1,
                CampaingContent = "Tüm ürünlerde indirim zamanı",
                CompanyTime     = "2 ay",
                Discont         = 100
            };

            gameOrderManager.Selling(game1, gamer1, campaing1);
        }
Exemplo n.º 10
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new GamerCheckManager());

            gamerManager.Add(new Gamer {
                BirthYear = 1994, FirstName = "seyfo", IdNumber = 1, LastName = "kara"
            });

            Game game = new Game();

            game.GameId    = 1;
            game.GameName  = "The Last Day Of The World";
            game.GamePrice = 125;

            Discount discount = new Discount();

            discount.DiscountId      = 1;
            discount.DiscountName    = "Christmas Campaign";
            discount.DiscountPercent = 50;

            Console.WriteLine("Dear  Gamer "
                              + " , you got  "
                              + discount.DiscountName
                              + ", you have %"
                              + discount.DiscountPercent
                              + " discount at this game "
                              + game.GameName);
        }
Exemplo n.º 11
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer()
            {
                Id             = 1,
                FirstName      = "Musa",
                LastName       = "Erkek",
                BirthYear      = new System.DateTime(1998, 1, 1),
                IdentityNumber = "12345678910"
            };

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

            gamerManager.Add(gamer1);

            Game game1 = new Game()
            {
                Id = 1, Name = "Witcher3", Price = 50
            };

            GameManager gameManager = new GameManager();

            gameManager.Add(game1);

            Campaign campaign1 = new Campaign()
            {
                Id = 1, Name = "Black Friday", Discount = 30
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
        }
Exemplo n.º 12
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id        = 1;
            gamer1.UserName  = "******";
            gamer1.FirstName = "Hamza";
            gamer1.LastName  = "DOĞRU";

            Campaing campaing1 = new Campaing();

            campaing1.SerialNumber = 2313321;
            campaing1.StartingDate = new DateTime(1995, 5, 5);
            campaing1.EndDate      = new DateTime(2021, 2, 2);

            Game game1 = new Game();

            game1.GameName    = "LOL";
            game1.ReleaseDate = new DateTime(2002, 2, 2);
            game1.Price       = 55;

            RegistorManager registorManager = new RegistorManager();
            IManager        gamermanager    = new GamerManager();
            CampaingManager campaingManager = new CampaingManager();
            ISalesManager   salesManager    = new GameManager();

            salesManager.SellingGames(gamer1, campaing1, game1);
            registorManager.Update(campaingManager);
            registorManager.Delete(gamermanager);
        }
Exemplo n.º 13
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                NationalID = ..., FirstName = "Uğur", LastName = "Yazgan", BirthYear = 1996
            });
Exemplo n.º 14
0
        static void Main(string[] args)
        {
            Gamer Onur = new Gamer {
                Id = 1, FirtName = "Onur", LastName = "Göz", NationalityId = "17462618612", DateOfBirth = new DateTime(1998, 7, 10)
            };
            GamerManager gamerManager = new GamerManager(new MernisServiceAdapter());

            gamerManager.Add(Onur);
            GameManager gameManager = new GameManager();
            Game        game1       = new Game {
                GameId = 0, GameName = "Game0", GamePrice = 15
            };
            Game game2 = new Game {
                GameId = 1, GameName = "Game1", GamePrice = 20
            };
            Game game3 = new Game {
                GameId = 2, GameName = "Game2", GamePrice = 25
            };
            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(new Campaign {
                CampaignId = 1, CampaignLevel = 10, CampaignName = "campany1"
            }, game1);
            gameManager.GameSales(game2, Onur);
        }
Exemplo n.º 15
0
        static void Main(string[] args)
        {
            Console.WriteLine("GAMES");
            Game game1 = new Game()
            {
                GameID = 1, Name = "League of Legends", Price = 200
            };
            Game game2 = new Game()
            {
                GameID = 2, Name = "PUBG", Price = 300
            };
            Game game3 = new Game()
            {
                GameID = 3, Name = "Counter-Strike: Global Offensive", Price = 450
            };

            GameManager gameManager = new GameManager();

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

            Console.WriteLine("");
            Console.WriteLine("GAMERS");

            Gamer gamer = new Gamer()
            {
                GamerID = 1, Identity = "11111", Name = "Ayşe", Surname = "Akışık", BirthYear = 1999
            };

            GamerManager gamerManager = new GamerManager(new AuthenticationManager());

            gamerManager.Add(gamer);

            Console.WriteLine("");
            Console.WriteLine("CAMPAIGNS");

            Campaign campaign1 = new Campaign()
            {
                CampaignID = 1, Name = "Campaign1"
            };
            Campaign campaign2 = new Campaign()
            {
                CampaignID = 2, Name = "Campaign2"
            };

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
            campaignManager.Update(campaign1);
            campaignManager.Remove(campaign1);

            Console.WriteLine("");
            Console.WriteLine("SALES");

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer, game1);
            salesManager.CampaignSales(gamer, game2, campaign2);
        }
Exemplo n.º 16
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1999, FirstName = "Halime", LastName = "Kaya", IdendityNumber = 12345
            });
            gamerManager.Add(new Gamer {
                Id = 2, BirthYear = 1995, FirstName = "Ceren", LastName = "Bingöl", IdendityNumber = 123456
            });

            GameManager gameManager = new GameManager();

            gameManager.Add(new Game {
                Id = 1, GameName = "PUBG", UnitPrice = 50
            });
            gameManager.Add(new Game {
                Id = 2, GameName = "GTA5", UnitPrice = 50
            });

            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Create(new Campaign {
                Id = 1, CampaignName = "Pubg indirimi", Discount = 10
            });

            OrderManager order = new OrderManager(new CampaignManager());

            order.Create(new Game {
                Id = 1, GameName = "PUBG"
            });
        }
Exemplo n.º 17
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, FirstName = "Gamze", LastName = "Okumuş", BirthYear = 2000, IdentityNumber = 1511
            });

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

            campaignManager.Add(new Campaign()
            {
                CampaignName = "%10 İndirimli Öğrenci Kampanyası"
            });
            campaignManager1.Update(new Campaign()
            {
                CampaignName = "%20 İndirim Kampanyası"
            });
            campaignManager1.Delete(new Campaign()
            {
                CampaignName = "%50 İNDİRİMLİ BÜYÜK YIL SONU KAMPANYASI"
            });

            SalesManager salesManager = new SalesManager(new CampaignManager());

            salesManager.Add(new Gamer {
                FirstName = "Gamze "
            }, new Campaign {
                CampaignName = "%20 İndirim Kampanyasını"
            });
        }
Exemplo n.º 18
0
        static void Main(string[] args)
        {
            GamerManager gamer = new GamerManager(new UserValidationManager());

            gamer.NewRegistration(new Gamer {
                DateOfBrith = 1999, FisrtName = "HÜSEYİN", LastName = "PALAMAR", Id = 1
            });

            AdminManager admin = new AdminManager(new AdminValidationManager());

            admin.NewRegistration(new User {
                DateOfBrith = 1999, FisrtName = "HÜSEYİN", LastName = "PALAMAR", Id = 1, IdentificationNumber = 123456
            });

            GameSaleManager gameSale = new GameSaleManager();

            gameSale.GameSale(new Game {
                GameName = "CSGO", GamePrice = 150, SerialNumber = "1"
            }, new Gamer {
                FisrtName = "İlkay"
            });

            CampaignManager campaign = new CampaignManager();

            campaign.AddCampaign(new Campaign {
                CampaignName = "Efsane Cuma", Id = 2, CampaignDescription = "Avantajlı urünleri kaçırmayın", CampaignDuration = "18 Hazirana kadar Geçerli"
            });
        }
Exemplo n.º 19
0
        static void Main(string[] args)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id            = 1;
            gamer1.FirstName     = "öznur";
            gamer1.LastName      = "krsy";
            gamer1.NationalityId = "12345";
            gamer1.DateOfBirth   = 1998;

            Game game1 = new Game();

            game1.Id    = 1;
            game1.Name  = "GTA";
            game1.Price = 50;

            Game game2 = new Game {
                Id = 2, Name = "Outlast", Price = 100
            };

            Campaign campaign1 = new Campaign();

            campaign1.Id           = 10;
            campaign1.CampaignName = "Şubat Kampanyası";
            campaign1.CampaignRate = 30;

            Campaign campaign2 = new Campaign {
                Id = 11, CampaignName = "Yeni yıl kampanyası", CampaignRate = 50
            };


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

            gamerManager.Add(gamer1);


            GameManager gameManager = new GameManager();

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

            CampaignManager campaignManager = new CampaignManager();

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

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(game2, gamer1);
            salesManager.CampaignSales(gamer1, game1, campaign2);
        }
Exemplo n.º 20
0
        public static void Main(string[] args)
        {
            Gamer gamer = new Gamer
            {
                Id            = 1,
                FirstName     = "SALİHA",
                LastName      = "BİTER",
                DateOfBirth   = new DateTime(1992, 6, 1),
                NationalityId = 31807737400
            };


            BaseEntityManager <Gamer> gamerManager = new GamerManager(new Gamer {
                Id = 1, FirstName = "SALİHA", LastName = "BİTER", DateOfBirth = new DateTime(1992, 6, 1), NationalityId = 31807737400
            });

            gamerManager.Add(gamer);

            gamer.FirstName   = "FATIMA SALİHA";
            gamer.DateOfBirth = new DateTime(1993, 6, 6);

            gamerManager.Update(gamer);

            gamerManager.Delete(gamer);

            gamerManager.Add(gamer);
        }
Exemplo n.º 21
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer();

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

            gamerManager.Add(new Gamer {
                Id             = 1,
                BirthYear      = 1985,
                FirstName      = "ENGİN",
                LastName       = "DEMİROĞ",
                IdentityNumber = 12345
            });

            Game game = new Game()
            {
                Id = 1, GameName = "Counter", Price = 10
            };
            Campaign campaign = new Campaign()
            {
                Id = 1, CampaignName = "Kampanya1", CampaignPrice = 8
            };

            SaleManager saleManager = new SaleManager();

            saleManager.Sale(gamer, game);
            saleManager.CampaignSale(gamer, game, campaign);
        }
Exemplo n.º 22
0
        private static void GamerTest()
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id        = 1,
                FirstName = "Ayşe",
                LastName  = "Ayşe",
                BirthYear = 1923,
                UserId    = 1,
                UserName  = "******"
            });
            gamerManager.Delete(new Gamer {
                Id = 1
            });
            gamerManager.Update(new Gamer
            {
                Id        = 1,
                FirstName = "Deniz",
                LastName  = "Deniz",
                BirthYear = 1923,
                UserId    = 1,
                UserName  = "******"
            });
        }
Exemplo n.º 23
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer        = new Gamer
            {
                GamerId        = 1,
                DateOfBirth    = new DateTime(1984, 03, 02),
                FirstName      = "ENES",
                LastName       = "BORA",
                IdentityNumber = 12607745192
            };

            gamerManager.Add(gamer);

            CampaignRateManager campaignRateManager = new CampaignRateManager();
            Campaign            campaign            = new Campaign {
                CampaingId = 1, CampaingName = "Eğlenceli %25 İndirim", DiscountRate = 0.25M
            };

            campaignRateManager.Add(campaign);

            GameManager gameManager = new GameManager();
            Game        game        = new Game {
                GameId = 1, GameName = "Minecraft", GamePrice = 145
            };

            gameManager.Add(game);


            SalesManager salesManager = new SalesManager();

            salesManager.Sales(gamer, game);
            salesManager.CampaignSales(game, gamer, campaign);
        }
Exemplo n.º 24
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer1       = new Gamer
            {
                Id             = 1,
                Name           = "Mine",
                LastName       = "Aktaş",
                BirthYear      = 1998,
                IdentityNumber = 12345
            };

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

            Game game1 = new Game
            {
                Id    = 1,
                Name  = "Pubg",
                Price = 120
            };

            Game game2 = new Game
            {
                Id    = 2,
                Name  = "Sims 3",
                Price = 450
            };

            GameManager gameManager = new GameManager();

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

            SalesManager sales1 = new SalesManager();

            sales1.Sell(gamer1, game1);
            sales1.Sell(gamer1, game2);
            sales1.Return(gamer1, game2);

            Campaign campaign = new Campaign();

            campaign.Id       = 1;
            campaign.Name     = "Kadınlar Günü İndirimi";
            campaign.Code     = 8032021;
            campaign.Discount = 50;

            CampaignManager campaignManager = new CampaignManager();

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

            sales1.SellWithDiscount(gamer1, game1, campaign);
        }
Exemplo n.º 25
0
        public static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Registration(new Gamer {
                NationalityNumber = "33355544422", FirstName = "Selim", LastName = "Kazancı", DateBirth = 14 - 01 - 1998
            });

            GamerManager gamerManager2 = new GamerManager(new NewLisValidationManager());

            gamerManager2.Registration(new Gamer {
                NationalityNumber = "33355544422", FirstName = "Selim", LastName = "Kazancı", DateBirth = 14 - 01 - 1998
            });

            GameSaleManager gameSaleManager = new GameSaleManager();

            gameSaleManager.Sale(new Gamer {
                NationalityNumber = "33355544422", FirstName = "Selim", LastName = "Kazancı", DateBirth = 14 - 01 - 1998
            });

            CampaigneManager campaigneManager = new CampaigneManager();

            campaigneManager.CampaingneEnter();
            campaigneManager.CampaingneUpdate();
            campaigneManager.NewCampaingneEnter();
        }
Exemplo n.º 26
0
        static void Main(string[] args)
        {
            //Oyuncu Oluşturma
            Gamer gamer1 = new Gamer();

            gamer1.Id            = 1;
            gamer1.FirstName     = "Yiğit";
            gamer1.LastName      = "Nebioğlu";
            gamer1.NationalityId = 18899276482;
            gamer1.BirthYear     = 1995;

            //Oyuncu Ekleme (Add)
            GamerManager gamerManager1 = new GamerManager(new MernisServiceAdapter());

            gamerManager1.Add(gamer1);
            //Oyuncu Silme (Delete)
            gamerManager1.Delete(gamer1);
            //Oyuncu Güncelleme (Update)
            gamerManager1.Update(gamer1);

            //Oyun Oluşturma
            Game game1 = new Game();

            game1.GameId    = 1;
            game1.GameName  = "Game 1";
            game1.GamePrice = 100;

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

            gameManager1.Add(game1);
            //Oyun Silme
            gameManager1.Delete(game1);
            //Oyun Güncelleme
            gameManager1.Update(game1);

            //Kampanya Oluşturma
            Campaign campaign1 = new Campaign();

            campaign1.CampaignId   = 1;
            campaign1.CampaignName = "Discount 10";
            campaign1.DiscountRate = 10;

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

            campaignManager1.Add(campaign1);
            //Kampanya Silme
            campaignManager1.Delete(campaign1);
            //Kampanya Güncelleme
            campaignManager1.Update(campaign1);

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

            //Normal Satış
            salesManager.Sales(game1, gamer1);
            //Kampanyalı Satış
            salesManager.CampaignSales(game1, gamer1, campaign1);
        }
Exemplo n.º 27
0
        static void Main(string[] args)
        {
            GamerManager gamerManager1 = new GamerManager(new GamerCheckService());
            Gamer        gamer1        = new Gamer()
            {
                Id = 1, FirstName = "Berna", LastName = "Bayuk", DateOfBirth = new DateTime(1995, 5, 17), NationalityId = "12345678910"
            };

            Game game1 = new Game()
            {
                Id = 1, Name = "PUBG", Price = 600
            };
            Game game2 = new Game()
            {
                Id = 2, Name = "GTA 5", Price = 500
            };

            Campaign campaign1 = new Campaign()
            {
                Id = 1, Name = "Yeni Üye Kampanyası", DiscountRate = 10
            };

            SalesManager salesManager = new SalesManager();

            salesManager.Sales(game1, gamer1);
            salesManager.CampaignSales(game2, gamer1, campaign1);
        }
Exemplo n.º 28
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer()
            {
                Id = 1, BirthYear = 1985, FirstName = "Hilmi", LastName = "Turgut", IdentityNumber = 12345
            };
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(gamer);

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

            //gamerManager.Add(new Gamer { Id = 1, BirthYear = 1985, FirstName = "Hilmi", LastName = "Turgut", IdentityNumber = 12345 });

            Campaign campaign = new Campaign()
            {
                Id = 1, CampaignName = "Korona için EVDEKAL indirimi", CampaignDiscount = 50
            };
            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign);

            Game game = new Game()
            {
                Id        = 1,
                GameName  = "CyperPunk 2077",
                GamePrice = 300,
            };
            SaleManager saleManager = new SaleManager();

            saleManager.CampaignSale(gamer, game, campaign);
        }
Exemplo n.º 29
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer
            {
                Id             = 1,
                BirthYear      = 2000,
                FirstName      = "HAMZA",
                LastName       = "KARACA",
                IdentityNumber = 60406214340
            });

            SaleManager saleManager = new SaleManager(new PaymentValidation());

            saleManager.sell(new Game
            {
                GameName    = "Pubg",
                GameId      = 1,
                Price       = 50,
                ReleaseDate = 2018
            });
            Game           game           = new Game();
            WinterCampaign winterCanpaign = new WinterCampaign();

            winterCanpaign.Add(game);
        }
Exemplo n.º 30
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id             = 1,
                BirthYear      = 1985,
                FirstName      = "Yasir",
                LastName       = "Demirci",
                IdentityNumber = 123456
            });
            gamerManager.Update(new Gamer
            {
                Id             = 1,
                BirthYear      = 1985,
                FirstName      = "Yasir",
                LastName       = "Demirci",
                IdentityNumber = 123456
            });
            gamerManager.Delete(new Gamer
            {
                Id             = 1,
                BirthYear      = 1985,
                FirstName      = "Yasir",
                LastName       = "Demirci",
                IdentityNumber = 123456
            });
            Console.WriteLine("---------------------");
        }