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

            Gamer gamer1 = new Gamer()

            {
                Id             = 1,
                Name           = "John",
                Surname        = "Doe",
                DateOfBirth    = new DateTime(1990, 1, 9),
                IdentifyNumber = "12345678945"
            };

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



            Game game1 = new Game()
            {
                GameId    = 1,
                GameName  = "Valheim",
                GamePrice = 100
            };
            GameManager gameManager = new GameManager();

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



            Campaign campaign1 = new Campaign()
            {
                CampaignId      = 1,
                CampaignName    = "CoffeeStainStudios are on sale in turkey",
                CampaignDetails = "%50 Discount ! ",
            };
            CampaignManager campaignManager = new CampaignManager();

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


            SalesManager salesManager1 = new SalesManager();

            salesManager1.Sale(gamer1);

            DatabaseLoggerService databaseLoggerService = new DatabaseLoggerService();

            databaseLoggerService.Log(databaseLoggerService);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("**********Üye Kaydı*********");

            BaseGamerManager gamerManager = new BaseGamerManager(new MernisServiceAdapter());

            gamerManager.Add(new Entities.Gamer
            {
                DateOfBirth   = new DateTime(1983, 9, 23),
                FirstName     = "MURAT",
                LastName      = "FIRTINA",
                NationalityId = "44689425372"
            });
            Console.ReadLine();

            Product product1 = new Product {
                ProductId = 10, ProductName = "FIFA2021", ProductUnitPrice = 90
            };
            Product product2 = new Product {
                ProductId = 11, ProductName = "NFS7", ProductUnitPrice = 80
            };
            Product product3 = new Product {
                ProductId = 12, ProductName = "PES2021", ProductUnitPrice = 95
            };

            Campaign campaign1 = new Campaign {
                CampaignId = 20, CampaignName = "Yeni Yıl", DicountRate = 10
            };
            Campaign campaign2 = new Campaign {
                CampaignId = 21, CampaignName = "Hızlı ve Ucuz", DicountRate = 15
            };
            Campaign campaign3 = new Campaign {
                CampaignId = 22, CampaignName = "Futbol Haftası", DicountRate = 5
            };

            ProductManager  productManager  = new ProductManager();
            CampaignManager campaignManager = new CampaignManager();
            SalesManager    salesManager    = new SalesManager();

            Console.WriteLine("************Oyunlar************\n");
            List <Product> productsList = new List <Product> {
                product1, product2, product3
            };

            productManager.GetAll(productsList);

            Console.WriteLine("************Kampanyalar************\n");
            List <Campaign> campaignList = new List <Campaign> {
                campaign1, campaign2, campaign3
            };

            campaignManager.GetAll(campaignList);
        }
コード例 #3
0
        private static void OyuncuEkle(BaseGamerManager gamerManager)
        {
            Gamer gamer1 = new Gamer();

            gamer1.Id = 1;
            Console.Write("Oyuncu adını giriniz : ");
            gamer1.FirstName = Console.ReadLine().ToUpper();
            Console.Write("Oyuncu soyadını giriniz : ");
            gamer1.LastName = Console.ReadLine().ToUpper();
            Console.Write("Oyuncunun doğum yılını giriniz : ");
            gamer1.DateOfBirth = Convert.ToInt32(Console.ReadLine());
            Console.Write("Oyuncunun T.C. Kimlik Numarasını giriniz : ");
            gamer1.NationalityId = Convert.ToInt64(Console.ReadLine());
            Console.WriteLine("**************************************");

            gamerManager.Add(gamer1);
        }