Exemple #1
0
        static void Main(string[] args)
        {
            GamerManager gamerManager = new GamerManager(new UserValidationManager());
            Gamer        gamer1       = new Gamer {
                Id = 1, FName = "BEYZA", LName = "YAYLA", BirthYear = 1999, IdentityNumber = 1234567890
            };

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

            CampaignManager campaignManager = new CampaignManager();
            Campaign        campaign1       = new Campaign {
                Id = 1, CampaignName = "Spring Sale", DiscountPercentage = 35
            };

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

            OrderManager orderManager = new OrderManager();

            orderManager.Order(gamer1);
            orderManager.CampaignOrder(gamer1, campaign1);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer();

            gamer.Id   = 1; gamer.FirstName = "Yunus"; gamer.LastName = "Öztürk";
            gamer.TcNo = "14356789345"; gamer.NickName = "jigsaw"; gamer.BirthOfDay = "01.08.2002";


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

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

            Game game1 = new Game()
            {
                Name = "ps2021", Price = 200
            };
            Game game2 = new Game()
            {
                Name = "Mobile Legends", Price = 100
            };
            List <Game> games = new List <Game>()
            {
                game1, game2
            };

            Campaign campaign = new Campaign();

            campaign.Id = 3; campaign.FirstName = "Yelllow Friday"; campaign.DiscountRate = 50; campaign.CampaingDetails = "Galatasraya destek olmak için";
            CampaignManager campaignManager = new CampaignManager();

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

            Sales sales = new Sales();

            sales.Sell(games, gamer, campaign);
        }