コード例 #1
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1985, FirstName = "ENGİN", LastName = "DEMİROĞ", IdentityNumber = 12345
            });
            CampaignManager campaignManager = new CampaignManager(new Campaign {
                Id = 1, Name = "Yaz", Rate = 10
            });

            campaignManager.Add();
            Game game = new Game {
                Id = 3, Name = "Pacman", Price = 15
            };
            GameManager gameManager = new GameManager(game);

            gameManager.AddCampaign(new Campaign {
                Id = 1, Name = "Yaz", Rate = 10
            });
            OrderManager orderManager = new OrderManager(new Order
            {
                Id       = 2,
                Games    = new List <Game> {
                },
                Checkout = 0
            });

            orderManager.AddToBasket(game);
            orderManager.FinalCheckout();
        }
コード例 #2
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, BirthYear = 1996, FirstName = "merve", LastName = "teke", IdentityNumber = 123456789
            });
            gamerManager.Delete(new Gamer {
                Id = 1, BirthYear = 1996, FirstName = "merve", LastName = "teke", IdentityNumber = 123456789
            });
            gamerManager.Update(new Gamer {
                Id = 2, BirthYear = 1996, FirstName = "merve", LastName = "teke", IdentityNumber = 123456789
            });



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

            campaignManager.Add(new Campaign()
            {
                Id           = 1,
                CampaignName = "Yaz Kampanyası",
                CampaignType = "Öğrenci İndirimi",
            });
            campaignManager1.Delete(new Campaign()
            {
                Id           = 2,
                CampaignName = "Kış Kampanyası",
                CampaignType = "Çalışan İndirimi",
            });
            campaignManager1.Update(new Campaign()
            {
                Id           = 3,
                CampaignName = "Bahar Kampanyası",
                CampaignType = "Herkes İçin İndirim",
            });

            Game game = new Game()
            {
                GameName  = "Flappy bird",
                GamePrice = 30,
            };

            SaleManager saleManager = new SaleManager(new CampaignManager());

            saleManager.Add(new Gamer {
                Id = 1
            }, new Game {
                GameName = "Flappy"
            }, new Campaign {
                CampaignName = "Kış Kampanyası"
            });
        }
コード例 #3
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidManager());
            Gamer        gamer        = new Gamer()
            {
                Id        = 5,
                FirstName = "semih",
                LastName  = "acar",
            };

            gamerManager.Add(gamer);
        }
コード例 #4
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer
            {
                FirstName     = "Melike",
                LastName      = "Akgül",
                BirthYear     = 1999,
                NationalityId = 12345
            };

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

            gamerManager.Add(gamer);
        }
コード例 #5
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());

            gamerManager.Add(new Gamer {
                Id = 1, FirstName = "Oguz", LastName = "Evirgen", BirthYear = 1998, IdentityNumber = 11111111111
            });


            Game game1 = new Game();

            game1.GamePrice = 100; //işlem için sadece bu gerekli

            Campaign campaign1 = new Campaign();

            campaign1.Discount = 15; //işlem için sadece bu gerekli

            OrderManager orderManager = new OrderManager();

            orderManager.Order(game1, campaign1); //game1 nesnesinden campaign1 kampanyası ile şipariş oluşturduk.
        }
コード例 #6
0
ファイル: Program.cs プロジェクト: kayacankayaaa/KampIntro
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new NewEStateUserValidationManager());
            gamerManager.Add(new Gamer {
                Id = 1,
                BirthYear = 1995,
                FirstName = "KAYACAN",
                LastName = "KAYA",
                IdendityNumber = 12345
            });

            GameManager gameManager = new GameManager();
            gameManager.Order(new Gamer
            {
                Id = 2,
                BirthYear = 1996,
                FirstName = "ÖZGE",
                LastName = "YIKICI",
                IdendityNumber = 234567

            });

            CampainManager campainManager = new CampainManager();
            campainManager.CampainAdd(new Game
            {
                Id = 1,
                GameName = "Fifa",
                UnitPrice = 10
            });
            campainManager.CampainDelete(new Game
            {
                Id = 2,
                GameName = "PES",
                UnitPrice = 15
            });
        }